-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
40 lines (33 loc) · 955 Bytes
/
jest.config.cjs
File metadata and controls
40 lines (33 loc) · 955 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
40
const { JSDOM } = require('jsdom');
const { TextEncoder, TextDecoder } = require('./tests/polyfills/text-encoding');
module.exports = {
// Environment setup
testEnvironment: 'jsdom',
setupFiles: ['./tests/setup.cjs'],
// Transform configuration
transform: {
'^.+\\.js$': 'babel-jest'
},
// Mock configurations
moduleNameMapper: {
'^d3$': '<rootDir>/tests/mocks/d3.cjs',
'^../../app/renderer/components/tooltip$': '<rootDir>/tests/mocks/tooltip.cjs'
},
// Test pattern matching
testMatch: [
'**/tests/**/*.test.js',
'**/tests/**/*.test.cjs',
'**/tests/simple-test.cjs'
],
// Allow transforming node_modules packages that use ES modules
transformIgnorePatterns: [
'node_modules/(?!(d3|d3-*)/)',
'node_modules/(?!d3|@d3)'
],
// Other settings
verbose: true,
// Add JSDOM configuration
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons']
}
};