forked from airbnb/visx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
49 lines (49 loc) · 1.41 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = {
bail: false,
collectCoverageFrom: [
'**/src/**/*.{ts,tsx,js,jsx}',
'**/test/**/*.{ts,tsx,js,jsx}',
'packages/src/**/*.{ts,tsx}',
'!node_modules/**',
'!packages/**/esm/**',
'!packages/**/lib/**',
'!packages/**/node_modules/**',
'!packages/visx-demo/**',
'!packages/visx-visx/**',
],
coverageDirectory: './coverage',
coveragePathIgnorePatterns: [
'coverage/',
'node_modules/',
'public/',
'esm/',
'lib/',
'tmp/',
'dist/',
],
coverageReporters: ['lcov', 'json-summary', 'html', 'json'],
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
moduleFileExtensions: ['mock.js', 'ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^.+\\.(ttf|eot|otf|svg|woff|woff2|mp3|png|jpg|jpeg|gif|ico)$':
'<rootDir>/config-jest/mocks/file.js',
},
roots: ['<rootDir>/packages'],
setupFiles: ['<rootDir>/config-jest/setup/shims.js', '<rootDir>/config-jest/setup/console.js'],
setupFilesAfterEnv: ['<rootDir>/config-jest/setup/enzyme.js'],
testEnvironment: 'jsdom',
testURL: 'http://localhost',
timers: 'fake',
verbose: false,
testPathIgnorePatterns: ['<rootDir>/packages/visx-demo'],
transformIgnorePatterns: [
'node_modules/(?!(d3-(array|color|format|geo|interpolate|scale|time|time-format)|delaunator|internmap|robust-predicates)/)',
],
};