-
Notifications
You must be signed in to change notification settings - Fork 187
Expand file tree
/
Copy pathjest.integration.config.js
More file actions
37 lines (37 loc) · 1.11 KB
/
Copy pathjest.integration.config.js
File metadata and controls
37 lines (37 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
displayName: 'Integration Tests',
roots: ['<rootDir>/tests/integration'],
testMatch: [
'**/integration/**/*.test.ts'
],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: {
paths: {
obsidian: ['node_modules/obsidian-test-mocks/dist/lib/cjs/obsidian/index.cjs']
}
}
}],
},
setupFiles: ['obsidian-test-mocks/jest-setup'],
setupFilesAfterEnv: ['<rootDir>/tests/test-setup.ts'],
moduleNameMapper: {
// Only mock Obsidian and UI libraries - use real date/parsing libraries
'^obsidian$': '<rootDir>/tests/helpers/obsidian-bridge.ts',
'^@fullcalendar/(.*)$': '<rootDir>/tests/__mocks__/fullcalendar.ts'
// chrono-node, rrule, ical.js, date-fns will use real implementations
},
// Integration tests may need more time for complex workflows
testTimeout: 30000,
clearMocks: true,
restoreMocks: true,
// Less strict coverage for integration tests (focus on workflow completion)
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/main.ts',
'!tests/**/*'
]
};