-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (24 loc) · 812 Bytes
/
jest.config.js
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
// Installing third-party modules by tnpm or cnpm will name modules with underscore as prefix.
// In this case _{module} is also necessary.
const esm = ['internmap', 'd3-*', 'lodash-es', 'chroma-js']
.map((d) => `_${d}|${d}`)
.join('|');
module.exports = {
testTimeout: 100000,
preset: 'ts-jest/presets/js-with-ts',
globals: {
'ts-jest': {
tsconfig: {
target: 'esnext', // Increase test coverage.
allowJs: true,
sourceMap: true,
},
},
},
collectCoverageFrom: ['src/**/*.ts', '!**/d3-sankey/**', '!**/d3-cloud/**'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
collectCoverage: false,
testRegex: '(/__tests__/.*\\.(test|spec))\\.(ts|tsx|js)$',
// Transform esm to cjs.
transformIgnorePatterns: [`<rootDir>/node_modules/(?!(${esm}))`],
};