-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
40 lines (39 loc) · 1.01 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
process.env.TZ = 'GMT';
module.exports = {
roots: ['<rootDir>'],
testMatch: ['**/tests/**/*.test.ts', '**/tests/**/*.test.tsx', '**/*.test.ts', '**/*.test.tsx'],
setupFilesAfterEnv: ['<rootDir>/src/test/jest.setup.js'],
testPathIgnorePatterns: ['<rootDir>/build/', '/dist/', '<rootDir>/node_modules/'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'json'],
collectCoverageFrom: [
'**/src/**/**/*.{js,jsx,ts,tsx}',
'src/**/*.{js,jsx,ts,tsx}',
'!src/redux/**/index.ts',
'!**/src/components/**/*.stories.+(js|ts|tsx)',
'!**/__tests__/**',
'!**/node_modules/**',
'!**/.next/**',
'!**/build/**',
],
reporters: [
'default',
[
'jest-html-reporter',
{
pageTitle: 'Unit Tests Report',
outputPath: './src/test/tests-report/unit-test-report.html',
includeFailureMsg: true,
includeConsoleLog: true,
},
],
],
coverageThreshold: {
global: {
statements: 80,
branches: 75,
functions: 80,
lines: 80,
},
},
projects: ['./src/test/jest.lint.js', './src/test/jest.unittest.js'],
};