forked from antvis/component
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
24 lines (23 loc) · 744 Bytes
/
jest.config.js
File metadata and controls
24 lines (23 loc) · 744 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
// Modules installed by tnpm or cnpm will use underscore as prefix.
// In this case _{module} is also necessary.
const esm = ['d3-*'].map((d) => `_${d}|${d}`).join('|');
module.exports = {
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
testTimeout: 30000,
preset: 'ts-jest/presets/js-with-ts',
globals: {
'ts-jest': {
tsconfig: {
allowJs: true,
sourceMap: true,
},
},
},
collectCoverage: false,
testRegex: '/tests/.*-spec\\.ts?$',
// Transform esm to cjs.
transformIgnorePatterns: [`<rootDir>/node_modules/(?!(${esm}))`],
collectCoverageFrom: ['src/**/*.{ts,js}', '!**/node_modules/**', '!**/vendor/**'],
moduleFileExtensions: ['ts', 'js', 'json'],
};