-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
52 lines (51 loc) · 1.04 KB
/
Copy pathjest.config.js
File metadata and controls
52 lines (51 loc) · 1.04 KB
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
46
47
48
49
50
51
export default {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
tsconfig: {
target: 'ES2022',
module: 'ESNext',
moduleResolution: 'node',
esModuleInterop: true,
resolveJsonModule: true,
rootDir: '.',
strict: false,
},
diagnostics: false,
},
],
},
testMatch: [
'**/tests/**/*.test.ts',
],
testPathIgnorePatterns: [
'/node_modules/',
'/dist/',
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/index.ts',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
testTimeout: 30000,
verbose: true,
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
};