-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (34 loc) · 988 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
33
34
35
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
clearMocks: true,
testEnvironment: 'node',
coverageReporters: ['html'],
coverageDirectory: '.coverage',
collectCoverage: true,
coverageProvider: 'v8',
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
collectCoverageFrom: ['<rootDir>/src/**/*.ts'],
coveragePathIgnorePatterns: ['.d.ts$'],
testMatch: ['<rootDir>/test/unit/**/*.ts'],
globalSetup: './test/unit-setup/setup.ts',
transform: {
//eslint-disable-next-line @typescript-eslint/naming-convention
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: './tsconfig-test.json',
diagnostics: {
warnOnly: true, //pnpm run test also runs tsc, therefore this is ok. this was introduced as expectTypeOf of an inferred type didn't work within jest, but worked correctly with tsc.
},
},
],
},
verbose: true,
};