-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathjest.config.js
42 lines (34 loc) · 1.2 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
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,
// An array of glob patterns indicating a set of files for which coverage information should be collected.
// In this repo, were are using it to EXCLUDE the helper file __jestSharedSetup.js
collectCoverageFrom: [
'src/**/{!(__jestSharedSetup),}.(js|ts|tsx)',
],
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
// This will be used to configure minimum threshold enforcement for coverage results.
coverageThreshold: {
global: {
branches: 74,
functions: 92,
lines: 83,
statements: 83,
},
},
// The paths to modules that run some code to configure or set up the testing environment before
// each test
setupFiles: [
'jest-canvas-mock',
],
// The test environment that will be used for testing
testEnvironment: 'jsdom',
setupFilesAfterEnv: [
'<rootDir>/src/__tests__/setup.js',
],
// Define what files are included as tests
testRegex: '.*\\/.+\\.test.(js|ts|tsx)$',
};