2021-11-11 01:16:15 +01:00
|
|
|
const nextJest = require('next/jest')
|
2021-11-08 17:35:04 +01:00
|
|
|
|
2021-11-11 01:16:15 +01:00
|
|
|
const createJestConfig = nextJest()
|
|
|
|
|
|
|
|
// Any custom config you want to pass to Jest
|
|
|
|
const customJestConfig = {
|
2021-08-24 14:52:45 +02:00
|
|
|
testMatch: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx'],
|
2021-09-13 14:36:25 +02:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/jest-setup-after-env.ts'],
|
2018-10-12 15:32:17 +02:00
|
|
|
verbose: true,
|
|
|
|
rootDir: 'test',
|
|
|
|
modulePaths: ['<rootDir>/lib'],
|
2021-12-21 19:52:07 +01:00
|
|
|
transformIgnorePatterns: ['/next[/\\\\]dist/', '/\\.next/'],
|
2018-10-12 15:32:17 +02:00
|
|
|
}
|
2021-11-11 01:16:15 +01:00
|
|
|
|
|
|
|
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async
|
|
|
|
module.exports = createJestConfig(customJestConfig)
|