Skip to content

Commit

Permalink
fix: test problems jest dom and paragon (openedx#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvente authored Feb 2, 2024
1 parent a9771fb commit 44d6dc6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ module.exports = createConfig('jest', {
],
testTimeout: 120000,
testEnvironment: 'jsdom',
moduleNameMapper: {
'^@openedx/paragon$': '<rootDir>/mockParagon.js',
'^@openedx/paragon/(.*)$': '<rootDir>/mockParagon.js',
},
});
1 change: 1 addition & 0 deletions mockParagon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
2 changes: 1 addition & 1 deletion src/setupTest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-extraneous-dependencies */
import '@testing-library/jest-dom';
import '@testing-library/jest-dom/extend-expect';
// breaking change here: https://github.com/testing-library/jest-dom/releases/tag/v6.0.0

import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Expand Down

0 comments on commit 44d6dc6

Please sign in to comment.