-
Notifications
You must be signed in to change notification settings - Fork 22
/
jest.config.cjs
53 lines (50 loc) · 1.76 KB
/
jest.config.cjs
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
const testRegex = [
'lib/l3/complex/csyrk/__test__/test.ts',
'lib/l3/complex/csyrk/__test__/wasm-test.ts',
'lib/utils/__test__/matrix-triangular.test.ts'
];
const collectCoverageFrom = [
'lib/l3/**/*.ts',
'lib/index.ts'
];
module.exports = {
automock: false,
collectCoverage: true,
maxWorkers: "50%",
collectCoverageFrom,
coveragePathIgnorePatterns: ['node_modules', 'test', 'doc.ts'],
coverageDirectory: 'coverage',
//coverageProvider: 'babel', //"v8" is still experimental, but use "v8" for walk through debugging
coverageProvider: 'v8', //"v8" is still experimental, but use "v8" for walk through debugging
coverageReporters: ['json', 'lcov', 'text', 'clover'],
preset: 'ts-jest',
testEnvironment: 'node',
verbose: true,
cacheDirectory: '.jest-cache',
testPathIgnorePatterns: ['/esm/', '/commonjs/', '/types/'],
//testMatch: ['**/__tests__/**/*.[t]s?(x)', '**/?(*.)+(spec|test).[t]s?(x)'],
testRegex,
transform: {
"\\.test\\.ts$": ["ts-jest", {
compiler: 'typescript',
tsconfig: 'tsconfig.json',
diagnostics: {
ignoreCodes: [151001],
},
}]
},
moduleNameMapper: {
'^@utils/(.*)$': '<rootDir>/lib/utils/$1',
/*'^@special/(.*)$': '<rootDir>/src/lib/special/$1',
'^@trig/(.*)$': '<rootDir>/src/lib/trigonometry/$1',
'^@rng/(.*)$': '<rootDir>/src/lib/rng/$1',
'^@lib/(.*)$': '<rootDir>/src/lib/$1',
'^lib/(.*)$': '<rootDir>/src/lib/$1'
*/
},
setupFiles: ['<rootDir>/lib/packages/__test__/jest-ext.d.ts'],
setupFilesAfterEnv: [
'<rootDir>/lib/packages/__test__/jest-extension.ts',
'<rootDir>/lib/packages/__test__/mock-of-debug.ts'
],
};