https://project.mdnd-it.cc/work_packages/94
This commit is contained in:
2025-08-23 04:25:28 +02:00
parent 725516ad6c
commit 19cfa031d0
25823 changed files with 1095587 additions and 2801760 deletions
+26
View File
@@ -0,0 +1,26 @@
// Jest test setup file
import { jest } from '@jest/globals';
import { LoggingService } from '../src/Application/Services/LoggingService';
// Mock environment variables
process.env.NODE_ENV = 'test';
process.env.JWT_SECRET = 'test-jwt-secret';
process.env.EMAIL_HOST = 'test.smtp.com';
process.env.EMAIL_PORT = '587';
process.env.EMAIL_USER = 'test@example.com';
process.env.EMAIL_PASS = 'testpass';
process.env.EMAIL_FROM = 'test@example.com';
process.env.APP_BASE_URL = 'http://localhost:3000';
// Global test timeout
jest.setTimeout(10000);
// Global cleanup to prevent Jest from hanging
afterAll(async () => {
try {
await LoggingService.getInstance().shutdown();
} catch (error) {
// Ignore cleanup errors in tests
console.log('Test cleanup completed');
}
});