We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 888f180 commit dae13d2Copy full SHA for dae13d2
1 file changed
apps/web/jest.client.config.ts
@@ -28,6 +28,11 @@ const config = {
28
globalSetup: "<rootDir>/jest.setup.ts",
29
globalTeardown: "<rootDir>/jest.teardown.ts",
30
moduleNameMapper: {
31
+ // Ensure a single React instance is used in tests to avoid
32
+ // "A React Element from an older version of React was rendered" errors
33
+ "^react$": "<rootDir>/node_modules/react",
34
+ "^react-dom$": "<rootDir>/node_modules/react-dom",
35
+ "^react/jsx-runtime$": "<rootDir>/node_modules/react/jsx-runtime.js",
36
"next-auth": "<rootDir>/__mocks__/next-auth.ts",
37
"@courselit/utils": "<rootDir>/../../packages/utils/src",
38
"@courselit/common-logic": "<rootDir>/../../packages/common-logic/src",
0 commit comments