-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
52 lines (42 loc) · 1.07 KB
/
Copy pathjest.config.js
File metadata and controls
52 lines (42 loc) · 1.07 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
50
51
52
// ABOUTME: Jest configuration for Node.js/JavaScript testing
// ABOUTME: Configures Jest with TypeScript support and Twilio Functions compatibility
module.exports = {
// Test environment
testEnvironment: 'node',
// File extensions to test
testMatch: [
'**/__tests__/**/*.(js|ts)',
'**/*.(test|spec).(js|ts)'
],
// Coverage configuration
collectCoverageFrom: [
'src/**/*.{js,ts}',
'functions/**/*.{js,ts}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/coverage/**'
],
// Coverage thresholds - Relaxed for template/starter project
coverageThreshold: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50
}
},
// Setup files
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
// Transform TypeScript files
transform: {
'^.+\\.ts$': 'ts-jest'
},
// Module file extensions
moduleFileExtensions: ['js', 'ts', 'json'],
// Clear mocks between tests
clearMocks: true,
// Verbose output
verbose: true,
// Test timeout for async operations
testTimeout: 10000
};