-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
45 lines (42 loc) · 948 Bytes
/
jest.config.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const nextJest = require('next/jest.js')
const createJestConfig = nextJest({
dir: './',
})
/** @type {import('jest').Config} */
const config = {
testEnvironment: 'jsdom',
coverageProvider: 'v8',
coverageDirectory: 'jest-coverage',
clearMocks: true,
collectCoverage: true,
testPathIgnorePatterns: [
'/e2e-tests/',
'/node_modules/',
'/__mocks__/',
'/models/',
'/scripts/',
'/utils/test.tsx',
],
coveragePathIgnorePatterns: [
'/e2e-tests/',
'/node_modules/',
'/__mocks__/',
'/models/',
'/scripts/',
'/utils/test.tsx',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
collectCoverageFrom: [
'**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!<rootDir>/out/**',
'!<rootDir>/.next/**',
'!<rootDir>/*.config.js',
'!<rootDir>/*.config.ts',
'!<rootDir>/jest-coverage/**',
],
};
module.exports = createJestConfig(config)