forked from ripple/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
41 lines (41 loc) · 1.32 KB
/
jest.config.js
File metadata and controls
41 lines (41 loc) · 1.32 KB
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
module.exports = {
roots: ['<rootDir>/src'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|tsx)?$': ['ts-jest', { diagnostics: { warnOnly: true } }],
'^.+\\.(js|jsx)$': 'babel-jest',
'^.+\\.(svg)$': '<rootDir>/testUtils/svgTransform.js',
'^.+\\.(css|scss)$': '<rootDir>/testUtils/cssTransform.js',
'^.+\\.(png)$': '<rootDir>/testUtils/imageTransform.js',
},
transformIgnorePatterns: ['node_modules/(?!arc)/(?!d3)'],
moduleNameMapper: {
'd3-hexbin': '<rootDir>/node_modules/d3-hexbin/build/d3-hexbin.min.js',
d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
},
clearMocks: true,
resetMocks: true,
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!<rootDir>/node_modules/',
'!src/index.js',
'!src/i18n/*',
'!src/setupTests.js',
'!src/setupProxy.js',
'!src/registerServiceWorker.js',
'!src/containers/shared/images/*',
'!src/containers/test/*',
'!src/coverage/*',
'!testUtils/*',
],
coverageThreshold: {
global: { branches: 70, functions: 80, lines: 80, statements: 80 },
},
coverageReporters: ['text', 'text-summary', 'html'],
verbatimModuleSyntax: false,
}