[Index Management] Fix duped mock (#155844)

This commit is contained in:
Ignacio Rivas 2023-04-26 12:12:24 +02:00 committed by GitHub
parent d8a1706bfd
commit 207c23e2da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,23 +49,6 @@ jest.mock('@elastic/eui', () => {
};
});
jest.mock('@kbn/kibana-react-plugin/public', () => {
const original = jest.requireActual('@kbn/kibana-react-plugin/public');
return {
...original,
// Mocking CodeEditor, which uses React Monaco under the hood
CodeEditor: (props: any) => (
<input
data-test-subj={props['data-test-subj'] || 'mockCodeEditor'}
data-currentvalue={props.value}
onChange={(e: any) => {
props.onChange(e.jsonContent);
}}
/>
),
};
});
describe('<ComponentTemplateCreate />', () => {
let testBed: ComponentTemplateCreateTestBed;