-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
53 lines (53 loc) · 1.24 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = {
rootDir: './',
coverageThreshold: {
'global': {
'branches': 40,
'functions': 40,
'lines': 40,
'statements': 40
}
},
collectCoverageFrom: [
'**/*.{js,jsx}'
],
collectCoverage:true,
moduleFileExtensions: [ 'js', 'json', 'jsx' ],
coveragePathIgnorePatterns: [
'/node_modules/',
'node_modules',
'jest.config.js',
'server.js',
'stylelint.config.js',
'config/*',
'postcss.config.js',
'build/*',
'mock/*',
'webpack.config.js',
'test/*',
'assets/*',
'node/__tests__/*',
'nodeService/*',
'dist/*',
'node/*',
'app/admin/components/spec/*',
'enzymeConfig.js',
'loadershim.js',
'app/admin/vue.app.js',
'src/*',
'app/front/react.app.js'
],
coverageDirectory: '<rootDir>/test/coverage',
moduleNameMapper: {
'Mocks(.*)$': '<rootDir>/mock/$1',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/styleMock.js'
},
transform: {
'^.+\\.svg$': 'jest-svg-transformer',
'^.+\\.js$': 'babel-jest'
},
setupTestFrameworkScriptFile: '<rootDir>/test/setupTests.js',
transformIgnorePatterns: ['<rootDir>/node_modules/'],
setupFiles: [`<rootDir>/loadershim.js`, `<rootDir>/__mocks__/setupFile.js`]
};