-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (27 loc) · 911 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
/**
* {@link https://jestjs.io/docs/configuration|(full reference)}
* @type {import('@jest/types').Config.InitialOptions}
*/
const config = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageDirectory: 'out/coverage', // Directory where Jest should output its coverage files
collectCoverage: true,
collectCoverageFrom: ['src/**/*.ts'],
rootDir: '.', // applied to all paths Jest references, including outputs
roots: ['src'], // directories that Jest should use to search for test files
// performance related
moduleFileExtensions: ['ts', 'js', 'json'],
testMatch: ['**/*.spec.ts'],
globalSetup: './jest.setup.js',
transform: {
'.ts$': [
'ts-jest', {
// Disables type-checking - which is already checked by the compiler.
// Reduces significantly the test suite's run time
isolatedModules: true,
}
],
},
}
module.exports = config