-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (36 loc) · 932 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
32
33
34
35
36
37
const argv = require('yargs').argv
const env = argv.env || 'development'
module.exports = {
clearMocks: true,
collectCoverageFrom: [
'src/**/*.js',
'!<rootDir>/node_modules/',
'!<rootDir>/src/setup-tests.js',
'!<rootDir>/src/index.js',
'!<rootDir>/src/application.js',
'!<rootDir>/src/mocks/**/*.js'
],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['/node_modules/'],
coverageReporters: ['html'],
coverageThreshold: {
global: {
statements: 95,
branches: 95,
functions: 95,
lines: 95
}
},
moduleNameMapper: {
'@environment$': `<rootDir>/environments/${env}.js`,
'@src\/(.*)$': `<rootDir>/src/$1`,
'balloon-css': '<rootDir>/src/mocks/styles-mock.js'
},
transform: {
'^.+\\.(css|scss)$': '<rootDir>/src/mocks/styles-mock.js',
'^.+\\.js$': 'babel-jest'
},
setupFilesAfterEnv: [
'<rootDir>/src/setup-tests.js'
]
}