forked from web3/web3.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
43 lines (40 loc) · 967 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
38
39
40
41
42
43
// TODO: Improve tests and add the branch property to the coverageThreshold config.
const config = {
// notifyMode: 'success-change',
collectCoverage: true,
coverageDirectory: './coverage/',
coverageThreshold: {
global: {
functions: 80,
lines: 80,
statements: 80
}
},
// notify: true,
clearMocks: true,
resetMocks: true,
resetModules: true,
testMatch: ['/**/**Test.js'],
transform: {
'^.+\\.js$': '<rootDir>/../../jest.preprocessor.js'
},
bail: true,
coveragePathIgnorePatterns: [
'node_modules',
'dist',
]
};
/**
* Returns the jest configuration with the moduleNameMapper object set.
*
* @param {Object} moduleNameMapper
*
* @returns {Object}
*/
module.exports = (moduleNameMapper) => {
if (moduleNameMapper) {
config['moduleNameMapper'] = moduleNameMapper;
return config;
}
return config;
};