forked from zaidmukaddam/scira-mcp-chat
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathjest.config.js
More file actions
45 lines (45 loc) · 1.11 KB
/
Copy pathjest.config.js
File metadata and controls
45 lines (45 loc) · 1.11 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
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
'\\.module\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', {
presets: [
['next/babel', {
'preset-react': {
runtime: 'automatic'
}
}]
]
}],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
testPathIgnorePatterns: [
'<rootDir>/.next/',
'<rootDir>/node_modules/',
'<rootDir>/tests/', // Exclude Playwright tests
],
collectCoverageFrom: [
'components/**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
],
// React 19 compatible configuration
testEnvironmentOptions: {
customExportConditions: [''],
},
extensionsToTreatAsEsm: ['.jsx', '.tsx'],
// Enable fake timers globally to fix waitFor issues
fakeTimers: {
enableGlobally: true,
},
// Remove deprecated globals
// globals: {
// 'ts-jest': {
// jsx: 'react',
// },
// },
};