-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
40 lines (39 loc) · 863 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
process.env.TESTING = 'true';
module.exports = {
rootDir: __dirname,
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^src/(.*)$': '<rootDir>/src/$1',
'^tests/(.*)$': '<rootDir>/testing-tools/$1',
},
snapshotSerializers: [],
testMatch: ['**/*.spec.(ts|tsx)'],
testURL: 'http://localhost/',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
modulePathIgnorePatterns: [
'node_modules',
'exceptions',
'tests',
'dist',
],
coveragePathIgnorePatterns: [
'node_modules',
'tests',
'dist',
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
};