-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
50 lines (50 loc) · 1.29 KB
/
jest.config.js
File metadata and controls
50 lines (50 loc) · 1.29 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
module.exports = {
testEnvironment: 'node',
roots: ['<rootDir>/test'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: {
module: 'commonjs',
resolveJsonModule: true,
types: ['jest', 'node']
}
}]
},
transformIgnorePatterns: [
'node_modules/(?!(.*)\\.ts$)'
],
moduleNameMapper: {
'^chalk$': '<rootDir>/test/__mocks__/chalk.ts'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
cacheDirectory: '<rootDir>/.jest-cache',
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
collectCoverageFrom: [
'lib/**/*.ts',
'bin/**/*.ts',
'scripts/**/*.ts',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/*.test.ts',
// Exclude interactive CLI commands from coverage (require manual testing)
'!bin/commands/setup-wizard.ts',
'!bin/commands/sync-secrets.ts',
'!bin/commands/deploy.ts',
// Exclude main entry point (hard to test)
'!bin/benchling-webhook.ts',
// Exclude utilities with low integration test coverage
'!lib/utils/stack-inference.ts',
'!lib/xdg-config.ts'
],
coverageThreshold: {
global: {
branches: 25,
functions: 39,
lines: 44,
statements: 42
}
}
};