-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
40 lines (40 loc) · 1.17 KB
/
Copy pathjest.config.js
File metadata and controls
40 lines (40 loc) · 1.17 KB
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
module.exports = {
// Run tests in projects mode to support both backend and frontend
projects: [
{
displayName: 'backend',
testEnvironment: 'node',
setupFilesAfterEnv: ['<rootDir>/tests/setup-backend.js'],
testMatch: ['**/tests/unit/**/*.test.js', '**/tests/integration/**/*.test.js'],
collectCoverageFrom: [
'services/**/*.js',
'utils/**/*.js',
'middleware/**/*.js',
'routes/**/*.js',
'!**/node_modules/**',
],
},
{
displayName: 'frontend',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/tests/setup.js'],
testMatch: ['**/tests/frontend/**/*.test.js'],
testPathIgnorePatterns: ['/node_modules/', '/tests/unit/', '/tests/integration/'],
collectCoverageFrom: ['public/js/**/*.js', '!public/js/vendor/**'],
moduleNameMapper: {
'^/js/vendor/flatpickr/flatpickr\\.esm\\.js$':
'<rootDir>/public/js/vendor/flatpickr/flatpickr.esm.js',
},
transform: {},
},
],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
};