-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.cjs
More file actions
57 lines (57 loc) · 1.35 KB
/
jest.config.cjs
File metadata and controls
57 lines (57 loc) · 1.35 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
52
53
54
55
56
57
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>'],
testMatch: [
'**/__tests__/**/*.ts',
'**/?(*.)+(spec|test).ts'
],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: {
esModuleInterop: true,
allowSyntheticDefaultImports: true,
allowImportingTsExtensions: true,
module: 'commonjs',
target: 'ES2020',
moduleResolution: 'node',
noEmit: true
},
diagnostics: {
ignoreCodes: [1343] // Ignore TS1343: import.meta errors
}
}]
},
collectCoverageFrom: [
'tools/**/*.{ts,js,cjs}',
'!tools/**/*.d.ts',
'!tools/**/__tests__/**',
'!tools/**/*.test.ts',
'!tools/**/*.spec.ts',
'!tools/builder/build-schema.ts',
'!tools/generator/generate-example.ts',
'!tools/generator/manual-bundle-schema.ts',
'!tools/validator/validate.ts'
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html', 'cobertura'],
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/'
],
coverageThreshold: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60
}
},
moduleFileExtensions: ['ts', 'js', 'json'],
moduleNameMapper: {
'^(.*)\\.ts$': '$1',
},
verbose: true,
testTimeout: 10000
};