-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
29 lines (26 loc) · 761 Bytes
/
Copy pathjest.config.js
File metadata and controls
29 lines (26 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const nextJest = require('next/jest')
const createJestConfig = nextJest({ dir: './' })
const config = {
testEnvironment: 'jest-environment-jsdom',
setupFilesAfterEnv: ['<rootDir>/__tests__/jest.setup.js'],
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
},
testMatch: [
'**/__tests__/**/*.test.ts?(x)',
'**/?(*.)+(spec|test).ts?(x)',
],
testTimeout: 10000,
verbose: true,
collectCoverage: true,
collectCoverageFrom: [
'lib/**/*.{ts,tsx}',
'components/**/*.{ts,tsx}',
'app/**/*.{ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
],
coverageReporters: ['json', 'lcov', 'text', 'clover'],
}
module.exports = createJestConfig(config)