-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjest.config.cjs
More file actions
36 lines (36 loc) · 976 Bytes
/
jest.config.cjs
File metadata and controls
36 lines (36 loc) · 976 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
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests'],
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
isolatedModules: true,
tsconfig: {
esModuleInterop: true,
allowSyntheticDefaultImports: true,
resolveJsonModule: true,
moduleResolution: 'node',
target: 'ES2020',
module: 'commonjs',
lib: ['ES2020', 'DOM'],
skipLibCheck: true,
}
}]
},
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
],
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
testTimeout: 10000,
// Ignore node_modules except for specific packages that need transformation
transformIgnorePatterns: [
'node_modules/(?!(your-esm-package)/)'
],
// Verbose output
verbose: true,
};