-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathjest.config.js
More file actions
50 lines (50 loc) · 1.41 KB
/
jest.config.js
File metadata and controls
50 lines (50 loc) · 1.41 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
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
projects: [
{
displayName: 'workspace-server',
testMatch: [
'<rootDir>/workspace-server/src/**/*.test.ts',
'<rootDir>/workspace-server/src/**/*.spec.ts',
],
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: {
strict: false,
},
},
],
},
transformIgnorePatterns: ['node_modules/'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/workspace-server/src/$1',
'\\.wasm$': '<rootDir>/workspace-server/src/__tests__/mocks/wasm.js',
},
roots: ['<rootDir>/workspace-server/src'],
setupFilesAfterEnv: ['<rootDir>/workspace-server/src/__tests__/setup.ts'],
collectCoverageFrom: [
'<rootDir>/workspace-server/src/**/*.ts',
'!<rootDir>/workspace-server/src/**/*.d.ts',
'!<rootDir>/workspace-server/src/**/*.test.ts',
'!<rootDir>/workspace-server/src/**/*.spec.ts',
'!<rootDir>/workspace-server/src/index.ts',
],
coverageDirectory: '<rootDir>/coverage',
coverageThreshold: {
global: {
branches: 45,
functions: 65,
lines: 60,
statements: 60,
},
},
},
],
coverageReporters: ['text', 'lcov', 'html'],
testTimeout: 10000,
verbose: true,
};