-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config-developer-node.js
44 lines (41 loc) · 1.07 KB
/
jest.config-developer-node.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
const nextJest = require('next/jest');
const createJestConfig = nextJest({
dir: './',
});
const customJestConfig = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@/public/(.*)$': '<rootDir>/public/$1',
},
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: [
'./src/**/*.{js,jsx,ts,tsx}',
'!./src/**/_*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
],
coverageDirectory: '<rootDir>/coverage/developer/node/',
coveragePathIgnorePatterns: [
'./src/__test__/developer/node/data',
'./src/__test__/developer/jsdom/data',
'./src/__test__/player',
'./src/apis',
'./src/components',
'./src/constants',
'./src/libs',
'./src/pages/404.tsx',
'./src/pages/game',
'./src/pages/index.tsx',
'./src/schema/request',
'./src/styles',
'./src/templates',
],
roots: ['<rootDir>/src/__test__/developer/node'],
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'babel-jest',
},
setupFilesAfterEnv: ['./jest.setup.ts'],
};
module.exports = createJestConfig(customJestConfig);