-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.base.js
More file actions
31 lines (25 loc) · 862 Bytes
/
jest.config.base.js
File metadata and controls
31 lines (25 loc) · 862 Bytes
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
module.exports = {
preset: 'ts-jest',
// Automatically clear mock calls and instances between every test
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
coveragePathIgnorePatterns: ['node_modules', 'index.ts'],
// The directory where Jest should output its coverage files
coverageDirectory: '<rootDir>/coverage',
// Indicates which provider should be used to instrument code for coverage
coverageProvider: 'babel',
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 85,
functions: 85,
lines: 85,
statements: -10,
},
},
// An array of file extensions your modules use
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
// The test environment that will be used for testing
testEnvironment: 'jsdom',
};