-
Notifications
You must be signed in to change notification settings - Fork 85
/
jest.config.js
48 lines (47 loc) · 1.12 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
45
46
47
48
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
projects: [
'<rootDir>/test-client/config/jest.config.js',
'<rootDir>/test-server/config/jest.config.unit.js',
'<rootDir>/test-server/config/jest.config.integration.js',
],
// coverage must be set up in this file
// and run all tests at once
collectCoverageFrom: [
// include -----------------------
// client code
'layouts/**/*.{ts,tsx}',
'views/**/*.{ts,tsx}',
'components/**/*.{ts,tsx}',
// client hooks
'lib-client/**/*.{ts,tsx}',
// server code
'lib-server/**/*.{ts,tsx}',
// client + server
'pages/**/*.{ts,tsx}',
'utils/**/*.{ts,tsx}',
// ignore, must come after -------
'!node_modules',
'!.next',
'!dist',
'!prisma',
'!themes',
'!test-client',
'!test-server',
'!tests-api',
'!tests-e2e',
'!notes',
'!server',
'!types',
],
// this is default, can be undefined
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 25,
functions: 25,
lines: 25,
statements: 25,
},
},
};