-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (30 loc) · 1.06 KB
/
jest.config.js
File metadata and controls
31 lines (30 loc) · 1.06 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
const project = require('./project.json');
module.exports = {
collectCoverageFrom: project.tests.source.files,
coverageReporters: ['html'],
coverageThreshold: {
global: {
statements: 100,
branches: 100,
functions: 100,
lines: 100
}
},
moduleNameMapper: {
'@cli\/(.*)$': `<rootDir>/${project.scripts.cli.source.root}$1`,
'@data\/(.*)$': `<rootDir>/${project.data.source.root}$1`,
'@scripts\/(.*)$': `<rootDir>/${project.scripts.webapp.source.root}$1`,
'@styles\/(.*)$': `<rootDir>/${project.styles.source.root}$1`,
'@images\/(.*)$': `<rootDir>/${project.images.source.root}$1`,
'@mocks\/(.*)$': `<rootDir>/${project.mocks.source.root}$1`,
'^.+\\.css$': '<rootDir>/src/webapp/mocks/raw-files.js',
'^axios$': '<rootDir>/node_modules/axios/dist/browser/axios.cjs'
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(png|svg|styl)$': '<rootDir>/src/webapp/mocks/raw-files.js',
'^.+\\.js$': 'babel-jest',
'^.+\\.html$': 'html-loader-jest'
}
};