-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.integration.config.js
More file actions
40 lines (38 loc) · 1.21 KB
/
Copy pathjest.integration.config.js
File metadata and controls
40 lines (38 loc) · 1.21 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
const { createJestConfig } = require('./jest.config.base')
const config = createJestConfig({
displayName: 'integration-tests',
testEnvironment: 'node',
testMatch: [
'<rootDir>/**/__tests__/integration/**/*.(ts|tsx|js|jsx)',
'<rootDir>/**/*.integration.(test|spec).(ts|tsx|js|jsx)'
],
setupFilesAfterEnv: ['<rootDir>/test-setup/integration-setup.ts'],
testTimeout: 30000, // Longer timeout for integration tests
maxWorkers: 1, // Run integration tests sequentially to avoid conflicts
collectCoverageFrom: [
'packages/**/*.{ts,tsx}',
'apps/web/src/app/api/**/*.{ts,tsx}',
'!**/*.d.ts',
'!**/*.stories.{ts,tsx}',
'!**/__tests__/**',
'!**/test-utils/**',
'!**/node_modules/**'
],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
},
moduleNameMapping: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@nextsaas/auth/(.*)$': '<rootDir>/packages/auth/src/$1',
'^@nextsaas/ui$': '<rootDir>/packages/ui/src',
'^@nextsaas/ui/(.*)$': '<rootDir>/packages/ui/src/$1',
},
globalSetup: '<rootDir>/test-setup/global-setup.ts',
globalTeardown: '<rootDir>/test-setup/global-teardown.ts',
})
module.exports = config