-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathjest.config.cjs
42 lines (42 loc) · 1.3 KB
/
jest.config.cjs
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
/** @type {import('jest').Config} */
module.exports = {
roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
moduleNameMapper: {
'^frontend/(.*)$': '<rootDir>/src/frontend/$1',
'^backend/(.*)$': '<rootDir>/src/backend/$1',
'^lib/(.*)$': '<rootDir>/src/lib/$1',
'\\.css$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/src/$1',
},
transform: {
'^.+\\.(t|j)sx?$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
},
],
},
transformIgnorePatterns: ['node_modules/(?!(@mui|framer-motion)/)'],
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{ts,tsx}',
'<rootDir>/src/**/*.{spec,test}.{ts,tsx}',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'],
coverageReporters: [
'json-summary', // Creates coverage-summary.json used by CI
'text', // Console output
'lcov', // Detailed HTML report
'clover', // Additional machine-readable format
],
coverageThreshold: {
global: {
branches: 1,
functions: 1,
lines: 1,
statements: 1,
},
},
}