feat(core): Implement Protocol V2 with enhanced settings and lifecycle hooks

This commit is contained in:
2025-05-26 04:02:32 +00:00
parent 91880f8d42
commit 33d2ff1d4f
24 changed files with 2356 additions and 441 deletions

View File

@@ -0,0 +1,41 @@
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');