36a6e436b3
* Don't swallow test failures caused by POSIX signals * Update tests to not import() inside jest * Update tests * apply suggestion Co-authored-by: JJ Kasper <jj@jjsweb.site>
16 lines
574 B
JavaScript
16 lines
574 B
JavaScript
const nextJest = require('next/jest')
|
|
|
|
const createJestConfig = nextJest()
|
|
|
|
// Any custom config you want to pass to Jest
|
|
const customJestConfig = {
|
|
testMatch: ['**/*.test.js', '**/*.test.ts', '**/*.test.tsx'],
|
|
setupFilesAfterEnv: ['<rootDir>/jest-setup-after-env.ts'],
|
|
verbose: true,
|
|
rootDir: 'test',
|
|
modulePaths: ['<rootDir>/lib'],
|
|
transformIgnorePatterns: ['/next[/\\\\]dist/', '/\\.next/'],
|
|
}
|
|
|
|
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js config which is async
|
|
module.exports = createJestConfig(customJestConfig)
|