UNPKG

@ufdevsllc/auth-me

Version:

Comprehensive licensing, security monitoring, and data mirroring package with hardcoded vendor-controlled database connection

45 lines (38 loc) 1.11 kB
/** * Jest Setup File * Global setup and teardown for tests */ // Increase timeout for all tests jest.setTimeout(30000); // Global cleanup after each test afterEach(async () => { // Clear all timers jest.clearAllTimers(); // Clear all mocks jest.clearAllMocks(); // Give time for async operations to complete await new Promise(resolve => setTimeout(resolve, 100)); }); // Global cleanup after all tests afterAll(async () => { // Force garbage collection if available if (global.gc) { global.gc(); } // Give time for final cleanup await new Promise(resolve => setTimeout(resolve, 200)); }); // Suppress console warnings in test environment const originalWarn = console.warn; console.warn = (...args) => { // Only suppress specific warnings that are expected in tests const message = args[0]; if (typeof message === 'string' && ( message.includes('TamperDetector') || message.includes('SecurityHardening') || message.includes('SecureGuard') )) { return; } originalWarn.apply(console, args); };