-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
44 lines (44 loc) · 1.09 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
/** @type Partial<import("@jest/types").Config.GlobalConfig> */
module.exports = {
clearMocks: true,
verbose: true,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
globals: {
__DEV__: true,
__TEST__: true,
__E2E__: false,
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': [
require.resolve('babel-jest'),
{ rootMode: 'upward' },
],
},
reporters: ['default', 'jest-github-reporter'],
testRunner: 'jest-circus/runner',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
moduleDirectories: ['node_modules'],
testPathIgnorePatterns: ['<rootDir>/lib/', '<rootDir>/node_modules/'],
testRegex: '/__tests__/.*\\.spec\\.tsx?$',
testEnvironment: 'node',
coverageReporters: ['json', 'lcov', 'text-summary', 'clover'],
coverageThreshold: {
global: {
functions: 50,
lines: 50,
statements: 50,
},
},
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'\\.d.ts',
'/__tests__/',
'/__fixtures__/',
],
collectCoverage: true,
cacheDirectory: '<rootDir>/.jest',
};