/
jest.config.js
36 lines (36 loc) 路 1.01 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
module.exports = {
roots: ['<rootDir>/tests/'],
verbose: true,
clearMocks: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts', '**/__tests__/**/?(*.)+(spec|test).ts'],
testRunner: 'jest-circus/runner',
testPathIgnorePatterns: ['/node_modules/', '/__fixtures__/'],
transform: {
'^.+\\.(ts)$': 'ts-jest',
},
setupFilesAfterEnv: ['jest-canvas-mock'],
collectCoverage: true,
collectCoverageFrom: [
'**/*.ts',
'!**/*.d.ts',
'!**/dist/**',
'!**/node_modules/**',
'!**/vendor/**',
'!**/generated/**',
'!**/__fixtures__/**',
'!**/scenarios/**',
'!**/redirects/**',
],
coverageThreshold: {
global: {
branches: 4,
functions: 4,
lines: 4,
statements: 4,
},
},
coverageDirectory: './coverage',
coverageReporters: ['json', 'lcov', 'text', 'clover', 'html'],
}