forked from ruvnet/ruflo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.setup.js
More file actions
29 lines (23 loc) · 787 Bytes
/
jest.setup.js
File metadata and controls
29 lines (23 loc) · 787 Bytes
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
/**
* Jest Setup File - ES Module Compatible
* Configure test environment and global settings
*/
// Set test environment flags
process.env.CLAUDE_FLOW_ENV = 'test';
process.env.NODE_ENV = 'test';
// Initialize logger for test environment
import { Logger } from './src/core/logger.js';
Logger.getInstance({
level: 'error',
format: 'json',
destination: 'console'
});
// Test timeout will be set in Jest config
// Suppress console output during tests unless explicitly needed
const originalConsole = { ...console };
// Store original console for restoration
global.originalConsole = originalConsole;
// Handle unhandled rejections in tests
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
});