From f47f0b8b6924dc06301f73edb38ddf09c7bb1cdb Mon Sep 17 00:00:00 2001 From: John Daly Date: Thu, 9 Mar 2023 23:10:55 -0800 Subject: [PATCH 1/2] Updating with-jest so that the moduleNameMapper isn't needed for custom module aliases --- examples/with-jest/jest.config.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/examples/with-jest/jest.config.js b/examples/with-jest/jest.config.js index fab58ef9be6dc..fd04a1cea7b71 100644 --- a/examples/with-jest/jest.config.js +++ b/examples/with-jest/jest.config.js @@ -8,12 +8,6 @@ const createJestConfig = nextJest({ // Add any custom config to be passed to Jest const customJestConfig = { setupFilesAfterEnv: ['/jest.setup.js'], - moduleNameMapper: { - // Handle module aliases (this will be automatically configured for you soon) - '^@/components/(.*)$': '/components/$1', - - '^@/pages/(.*)$': '/pages/$1', - }, testEnvironment: 'jest-environment-jsdom', } From 563ae4d4cbdeafa303455aebb25b746104b12e35 Mon Sep 17 00:00:00 2001 From: John Daly Date: Thu, 9 Mar 2023 23:15:12 -0800 Subject: [PATCH 2/2] Updating dependencies --- examples/with-jest/package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/with-jest/package.json b/examples/with-jest/package.json index 22a3e3932d463..978d6d25686b6 100644 --- a/examples/with-jest/package.json +++ b/examples/with-jest/package.json @@ -9,17 +9,17 @@ }, "dependencies": { "next": "latest", - "react": "^18.1.0", - "react-dom": "^18.1.0" + "react": "^18.2.0", + "react-dom": "^18.2.0" }, "devDependencies": { "@testing-library/jest-dom": "5.16.4", - "@testing-library/react": "13.2.0", - "@testing-library/user-event": "14.2.0", - "@types/react": "18.0.9", + "@testing-library/react": "14.0.0", + "@testing-library/user-event": "14.4.3", + "@types/react": "18.0.28", "@types/testing-library__jest-dom": "5.14.5", - "jest": "28.1.0", - "jest-environment-jsdom": "28.1.0", - "typescript": "4.6.4" + "jest": "29.5.0", + "jest-environment-jsdom": "29.5.0", + "typescript": "4.9.5" } }