-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjest.config.js
More file actions
28 lines (28 loc) · 828 Bytes
/
jest.config.js
File metadata and controls
28 lines (28 loc) · 828 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
module.exports = {
roots: [
'<rootDir>/app',
],
collectCoverageFrom: [
'**/*.{js,ts,jsx,tsx}',
'!**/node_modules/**',
],
transform: {
'^.+\\.(js|ts|jsx|tsx)?$': 'babel-jest',
'^.+\\.svg$': '<rootDir>/jest/svgTransform.js',
'^.+\\.png$': '<rootDir>/jest/pngTransform.js',
'^.+\\.css$': '<rootDir>/jest/cssTransform.js',
},
moduleNameMapper: {
'd3-shape': '<rootDir>/node_modules/d3-shape/dist/d3-shape.js',
'd3-path': '<rootDir>/node_modules/d3-path/dist/d3-path.js',
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!(d3.*)/)'],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js|tsx|jsx)?$',
moduleFileExtensions: [
'ts',
'js',
'tsx',
'jsx',
'json',
],
};