-
Notifications
You must be signed in to change notification settings - Fork 11
/
jest.config.js
57 lines (57 loc) · 1.16 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
54
55
56
57
module.exports = {
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/src/**/*.{js,jsx}',
],
coverageThreshold: {
global: {
lines: 0,
branches: 0,
functions: 0,
statements: 0,
},
},
coverageDirectory: '<rootDir>/reports/unit-tests/coverage',
coverageReporters: [
'lcov',
],
testMatch: [
'<rootDir>/src/**/*.test.{js,jsx}',
],
transform: {
'^.+\\.jsx?$': 'babel-jest',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\](?!lodash-es).+\\.(js|jsx)$',
],
moduleFileExtensions: ['js', 'jsx'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
'^lodash-es$': 'lodash',
},
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: '<rootDir>/reports/unit-tests',
},
],
],
setupFiles: [
'react-app-polyfill/jsdom',
'<rootDir>/.jest/register-context.js',
],
setupFilesAfterEnv: [
'jest-enzyme',
],
testEnvironment: 'enzyme',
testEnvironmentOptions: {
enzymeAdapter: 'react16',
},
globals: {
__DEV__: false,
__DEFAULT_BLOCKEXPLORER_API__: '',
},
}