/** * Test Execution Hooks — programmatic lifecycle hooks for test runs. */ import type { TestResult, SuiteResult } from './types'; export type BeforeAllHook = () => Promise | void; export type AfterAllHook = (results: SuiteResult) => Promise | void; export type BeforeEachHook = (testName: string) => Promise | void; export type AfterEachHook = (result: TestResult) => Promise | void; export type OnFailureHook = (testName: string, error: string) => Promise | void; export interface HooksRegistry { beforeAll: BeforeAllHook[]; afterAll: AfterAllHook[]; beforeEach: BeforeEachHook[]; afterEach: AfterEachHook[]; onFailure: OnFailureHook[]; } export declare function createHooksRegistry(): HooksRegistry; export declare function beforeAll(hook: BeforeAllHook): void; export declare function afterAll(hook: AfterAllHook): void; export declare function beforeEach(hook: BeforeEachHook): void; export declare function afterEach(hook: AfterEachHook): void; export declare function onFailure(hook: OnFailureHook): void; export declare function getGlobalHooks(): HooksRegistry; export declare function clearHooks(): void; export declare function runBeforeAll(registry: HooksRegistry): Promise; export declare function runAfterAll(registry: HooksRegistry, results: SuiteResult): Promise; export declare function runBeforeEach(registry: HooksRegistry, testName: string): Promise; export declare function runAfterEach(registry: HooksRegistry, result: TestResult): Promise; export declare function runOnFailure(registry: HooksRegistry, testName: string, error: string): Promise; /** * Parse hooks from YAML config format. */ export interface YamlHooksConfig { beforeAll?: { command: string; }; afterAll?: { command: string; }; beforeEach?: { command: string; }; afterEach?: { command: string; }; onFailure?: { command: string; }; } export declare function parseYamlHooks(config: YamlHooksConfig): { hookNames: string[]; }; //# sourceMappingURL=hooks.d.ts.map