feat: migrate enzyme to edx react-unit-test-utils
This commit is contained in:
committed by
GitHub
parent
1bc4e51c22
commit
dcdaace08d
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { shallow } from '@edx/react-unit-test-utils';
|
||||
|
||||
import { EditorState } from '@codemirror/state';
|
||||
import { EditorView } from '@codemirror/view';
|
||||
@@ -171,7 +171,7 @@ describe('CodeEditor', () => {
|
||||
test('Renders and calls Hooks ', () => {
|
||||
jest.spyOn(hooks, 'prepareShowBtnEscapeHTML').mockImplementation(() => ({ showBtnEscapeHTML: true, hideBtn: mockHideBtn }));
|
||||
// Note: ref won't show up as it is not acutaly a DOM attribute.
|
||||
expect(shallow(<module.CodeEditor {...props} />)).toMatchSnapshot();
|
||||
expect(shallow(<module.CodeEditor {...props} />).snapshot).toMatchSnapshot();
|
||||
expect(hooks.createCodeMirrorDomNode).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user