@@ -18,7 +18,7 @@ jest.mock('@backstage/plugin-catalog-react', () => ({
|
||||
useEntityList: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('@backstage/plugin-scaffolder-react/alpha', () => ({
|
||||
jest.mock('../TemplateGroup/TemplateGroup', () => ({
|
||||
TemplateGroup: jest.fn(() => null),
|
||||
}));
|
||||
|
||||
@@ -27,7 +27,7 @@ import { useEntityList } from '@backstage/plugin-catalog-react';
|
||||
import { TemplateGroups } from './TemplateGroups';
|
||||
import { renderInTestApp, TestApiProvider } from '@backstage/test-utils';
|
||||
import { errorApiRef } from '@backstage/core-plugin-api';
|
||||
import { TemplateGroup } from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { TemplateGroup } from '../TemplateGroup/TemplateGroup';
|
||||
|
||||
describe('TemplateGroups', () => {
|
||||
beforeEach(() => jest.clearAllMocks());
|
||||
|
||||
@@ -27,12 +27,9 @@ import {
|
||||
} from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateListPage, TemplateWizardPage } from '../../next';
|
||||
|
||||
jest.mock('../TemplateListPage', () => ({
|
||||
TemplateListPage: jest.fn(() => null),
|
||||
}));
|
||||
|
||||
jest.mock('../TemplateWizardPage', () => ({
|
||||
jest.mock('../../next', () => ({
|
||||
TemplateWizardPage: jest.fn(() => null),
|
||||
TemplateListPage: jest.fn(() => null),
|
||||
}));
|
||||
|
||||
describe('Router', () => {
|
||||
@@ -104,9 +101,9 @@ describe('Router', () => {
|
||||
|
||||
const mock = TemplateWizardPage as jest.Mock;
|
||||
|
||||
const [{ FormProps }] = mock.mock.calls[0];
|
||||
const [{ formProps }] = mock.mock.calls[0];
|
||||
|
||||
expect(FormProps).toEqual({
|
||||
expect(formProps).toEqual({
|
||||
transformErrors: transformErrorsMock,
|
||||
noHtml5Validate: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user