-
Notifications
You must be signed in to change notification settings - Fork 59
/
jest.config.js
33 lines (32 loc) · 841 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
// @flow
module.exports = {
transform: {
'.(js|jsx)': 'babel-jest',
},
testEnvironment: 'jest-environment-jsdom-global',
testRegex: '(\\.(test|spec))\\.(jsx|js)$',
testPathIgnorePatterns: ['/node_modules/', '/.cache/'],
modulePaths: ['src'],
moduleNameMapper: {
'\\.(scss|svg|png|jpg)$': '<rootDir>/src/styleMock.js',
},
moduleFileExtensions: ['jsx', 'js'],
coverageReporters: ['lcov', 'text', 'html'],
setupTestFrameworkScriptFile: './src/setupTests.js',
snapshotSerializers: ['enzyme-to-json/serializer'],
collectCoverageFrom: [
'src/**/*.{js,jsx}',
'!src/components/**/index.{js,jsx}',
'!src/types/**/*.js',
'!src/html.jsx',
'!src/styleMock.js',
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};