-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
39 lines (39 loc) · 993 Bytes
/
Copy pathjest.config.js
File metadata and controls
39 lines (39 loc) · 993 Bytes
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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: [
"**/tests/**/*.test.ts",
"**/tests/**/*.spec.js" // Add support for JavaScript spec files
],
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/node_modules/**"
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
verbose: true,
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1"
},
// Add ts-jest configuration to ignore type checking for faster runs
globals: {
'ts-jest': {
isolatedModules: true, // Disables type checking
diagnostics: false, // Disables diagnostic messages
}
},
// Add transform settings for JS files
transform: {
"^.+\\.tsx?$": ["ts-jest", { isolatedModules: true }],
"^.+\\.jsx?$": "babel-jest"
},
// Setup to run before tests
// setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
};