-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
44 lines (44 loc) · 1.45 KB
/
jest.config.js
File metadata and controls
44 lines (44 loc) · 1.45 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
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/tests'],
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(spec|test).ts'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/jest\\.setup\\.(ci|test)\\.ts$/'],
transformIgnorePatterns: [
'/node_modules/(?!(uuid|nanoid|@kubernetes/client-node)/)'
],
setupFilesAfterEnv: ['<rootDir>/tests/jest.setup.ci.ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: 'tsconfig.test.json',
useESM: true,
diagnostics: {
warnOnly: true,
ignoreCodes: ['TS2305', 'TS2724', 'TS2352', 'TS2339', 'TS4111', 'TS1259', 'TS2353', 'TS2702'],
},
}],
},
extensionsToTreatAsEsm: ['.ts'],
testTimeout: 30000, // 30 seconds for integration tests
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'],
coverageThreshold: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50
}
},
moduleNameMapper: {
'^@dash/(.*)$': '<rootDir>/src/$1',
'^@godel/(.*)$': '<rootDir>/src/$1',
'^@jtan15010/dash$': '<rootDir>/src/index.ts',
'^@jtan15010/godel$': '<rootDir>/src/index.ts',
'^(\\.{1,2}/.*)\\.js$': '$1',
'@kubernetes/client-node': '<rootDir>/node_modules/@kubernetes/client-node/dist/index.js'
},
modulePathIgnorePatterns: ['<rootDir>/packages/ai/'],
forceExit: true,
detectOpenHandles: false,
};