-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
49 lines (48 loc) · 1.1 KB
/
jest.config.cjs
File metadata and controls
49 lines (48 loc) · 1.1 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
41
42
43
44
45
46
47
48
49
/** @type {import('jest').Config} */
const config = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.tsx'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^@lib/(.*)$': '<rootDir>/lib/$1',
'^@components/(.*)$': '<rootDir>/components/$1',
'^@app/(.*)$': '<rootDir>/app/$1',
},
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
transformIgnorePatterns: [
'/node_modules/',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
collectCoverageFrom: [
'lib/**/*.ts',
'lib/**/*.tsx',
'components/**/*.ts',
'components/**/*.tsx',
'app/**/*.ts',
'app/**/*.tsx',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/coverage/**',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
testMatch: [
'<rootDir>/**/*.test.{ts,tsx}',
'<rootDir>/**/*.spec.{ts,tsx}',
],
testPathIgnorePatterns: [
'/node_modules/',
'/.next/',
'/.claude/worktrees/',
'/e2e/',
],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
};
module.exports = config;