-
Notifications
You must be signed in to change notification settings - Fork 45
/
jest.config.js
39 lines (31 loc) · 1.18 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
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
testMatch: ['<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)'],
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
modulePathIgnorePatterns: ['<rootDir>/.stryker-tmp'],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ['<rootDir>/settings/JestSetup.js'],
// The test environment that will be used for testing
testEnvironment: 'jsdom',
snapshotSerializers: ['@emotion/jest/serializer'],
};