diff --git a/docs/testing.md b/docs/testing.md index 90a78c421798dd0..6b0bc97e2699b39 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -281,7 +281,8 @@ const createJestConfig = nextJest({ // Add any custom config to be passed to Jest const customJestConfig = { - setupFilesAfterEnv: ['/jest.setup.js'], + // Add more setup options before each test is run + // setupFilesAfterEnv: ['/jest.setup.js'], // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work moduleDirectories: ['node_modules', '/'], testEnvironment: 'jest-environment-jsdom', @@ -329,7 +330,8 @@ module.exports = { // Handle module aliases '^@/components/(.*)$': '/components/$1', }, - setupFilesAfterEnv: ['/jest.setup.js'], + // Add more setup options before each test is run + // setupFilesAfterEnv: ['/jest.setup.js'], testPathIgnorePatterns: ['/node_modules/', '/.next/'], testEnvironment: 'jsdom', transform: {