-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
executable file
·37 lines (37 loc) · 1.32 KB
/
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
module.exports = {
collectCoverageFrom: ['client/**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'],
resetMocks: true,
verbose: true,
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
moduleDirectories: ['node_modules', 'test'],
moduleNameMapper: {
'\\.svg': '<rootDir>/test/svgr-mock.js',
'\\.(jpe?g|png|gif|webp)$': '<rootDir>/test/assets-transformer.js',
'^@/': '<rootDir>/client$1',
'^@assets(.*)$': '<rootDir>/client/assets$1',
'^@components(.*)$': '<rootDir>/client/components$1',
'^@config$': '<rootDir>/config/index',
'^@constants$': '<rootDir>/constants/index',
'^@context(.*)$': '<rootDir>/client/context$1',
'^@context$': '<rootDir>/client/context/index',
'^@helpers(.*)$': '<rootDir>/client/helpers$1',
'^@hooks(.*)$': '<rootDir>/client/hooks$1',
'^@routes(.*)$': '<rootDir>/client/routes$1',
'^@styles(.*)$': '<rootDir>/client/styles$1',
},
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', '<rootDir>/test/setup.js'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/node_modules/', '/config/', '/constants/'],
testURL: 'http://localhost:3001',
transform: {
'^.+\\.(j|t)sx?$': 'babel-jest',
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.((j|t)sx?)$'],
};