-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjest.config.js
31 lines (30 loc) · 968 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
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: {
'@vue$': 'vue/dist/vue.common.js',
'@vue/test-utils$': '@vue/test-utils',
'@vue\/(.*)$': `<rootDir>/${project.scripts.source.root.vue}$1`,
'@angular\/(.*)$': `<rootDir>/${project.scripts.source.root.angular}$1`,
'@react\/(.*)$': `<rootDir>/${project.scripts.source.root.react}$1`,
'@vanilla\/(.*)$': `<rootDir>/${project.scripts.source.root.vanilla}$1`,
'@styles\/(.*)$': `<rootDir>/${project.styles.source.root}$1`
},
setupFilesAfterEnv: [
'<rootDir>/jest.setup.js'
],
transform: {
'^.+\\.styl$': '<rootDir>/src/scripts/vanilla/mocks/raw-files.js',
'^.+\\.html$': 'html-loader-jest',
'^.+\\.js$': 'babel-jest'
}
};