Skip to content

Commit

Permalink
feat: migrate enzyme to edx react-unit-test-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed-Ali-Abbas-Zaidi authored Jan 24, 2024
1 parent 1bc4e51 commit dcdaace
Show file tree
Hide file tree
Showing 108 changed files with 1,154 additions and 1,045 deletions.
4 changes: 0 additions & 4 deletions example/setupTest.example.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
/* eslint-disable import/no-extraneous-dependencies */
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import MutationObserver from '@sheerun/mutationobserver-shim';
import { mergeConfig } from '@edx/frontend-platform';

Enzyme.configure({ adapter: new Adapter() });

/* need to mock window for tinymce on import, as it is JSDOM incompatible */

Object.defineProperty(window, 'matchMedia', {
Expand Down
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ module.exports = createConfig('jest', {
'<rootDir>/src/setupTest.js',
],
modulePaths: ['<rootDir>/src/'],
snapshotSerializers: [
'enzyme-to-json/serializer',
],
moduleNameMapper: {
'^lodash-es$': 'lodash',
},
Expand Down
Loading

0 comments on commit dcdaace

Please sign in to comment.