41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { tap } from '../../ts_tapbundle/index.js';
|
|
|
|
// TAP-compliant comment output
|
|
console.log('# 🚀 00init.ts: LOADED AND EXECUTING');
|
|
console.log('# 🚀 00init.ts: Setting up global test configuration');
|
|
|
|
// Add a global variable to verify 00init.ts was loaded
|
|
(global as any).__00INIT_LOADED = true;
|
|
|
|
// Configure global test settings
|
|
tap.settings({
|
|
// Set a default timeout of 5 seconds for all tests
|
|
timeout: 5000,
|
|
|
|
// Enable retries for flaky tests
|
|
retries: 2,
|
|
retryDelay: 1000,
|
|
|
|
// Show test duration
|
|
showTestDuration: true,
|
|
|
|
// Global lifecycle hooks
|
|
beforeAll: async () => {
|
|
console.log('Global beforeAll: Initializing test environment');
|
|
},
|
|
|
|
afterAll: async () => {
|
|
console.log('Global afterAll: Cleaning up test environment');
|
|
},
|
|
|
|
beforeEach: async (testName: string) => {
|
|
console.log(`Global beforeEach: Starting test "${testName}"`);
|
|
},
|
|
|
|
afterEach: async (testName: string, passed: boolean) => {
|
|
console.log(`Global afterEach: Test "${testName}" ${passed ? 'passed' : 'failed'}`);
|
|
}
|
|
});
|
|
|
|
console.log('# 🚀 00init.ts: Configuration COMPLETE');
|
|
console.log('# 🚀 00init.ts: tap.settings() called successfully'); |