-
Notifications
You must be signed in to change notification settings - Fork 452
Expand file tree
/
Copy pathjest.config.js
More file actions
24 lines (23 loc) · 833 Bytes
/
jest.config.js
File metadata and controls
24 lines (23 loc) · 833 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
const path = require('path');
module.exports = {
collectCoverage: true,
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: 'tsconfig.test.json'
}],
'^.+\\.js$': 'babel-jest' // Ensure JS files in node_modules can be transformed
},
setupFilesAfterEnv: [],
testMatch: ['**/*.test.ts'],
verbose: true,
collectCoverageFrom: ['**/*.{ts,jx}', '!**/node_modules/**', '!**/dist/**', '!**/lib/**', '!scripts/**'],
moduleNameMapper: {
'^axios$': path.join(__dirname, 'node_modules/axios/dist/node/axios.cjs')
},
// Tell Jest to compile d3 and its dependencies (which are ESM)
transformIgnorePatterns: [
'node_modules/(?!d3|d3-.*|internmap|delaunator|robust-predicates|axios)'
]
};