import 'reflect-metadata'; import { DIContainer, InjectionToken } from '../core/di/container.js'; import { ExecutionContext, Logger, LogMeta } from '../core/types.js'; type ClassConstructor = new (...args: unknown[]) => T; /** * Testing utilities for NitroStack */ /** * Log entry for mock logger */ interface LogEntry { level: string; message: string; meta?: LogMeta; } /** * Mock logger for testing */ export declare class MockLogger implements Logger { logs: LogEntry[]; debug(message: string, meta?: LogMeta): void; info(message: string, meta?: LogMeta): void; warn(message: string, meta?: LogMeta): void; error(message: string, meta?: LogMeta): void; clear(): void; hasLog(level: string, message: string): boolean; } /** * Create a mock execution context for testing */ export declare function createMockContext(overrides?: Partial): ExecutionContext; /** * Testing module builder */ export declare class TestingModule { private container; private providers; private mocks; private constructor(); /** * Create a testing module */ static create(): TestingModule; /** * Add a provider to the module */ addProvider(token: InjectionToken, provider?: ClassConstructor): this; /** * Add a mock to the module */ addMock(token: InjectionToken, mock: T): this; /** * Compile the testing module */ compile(): CompiledTestingModule; } /** * Compiled testing module */ export declare class CompiledTestingModule { private container; constructor(container: DIContainer); /** * Get an instance from the container */ get(token: InjectionToken): T; /** * Cleanup the module */ cleanup(): void; } /** * Mock function interface */ interface MockFn { (...args: TArgs): TReturn; calls: TArgs[]; mockReturnValue: TReturn | undefined; mockResolvedValue: (value: unknown) => MockFn>; mockRejectedValue: (error: unknown) => MockFn>; } /** * Create a mock function (compatible with Jest) */ export declare function createMockFn(): MockFn; /** * Wait for async operations to complete */ export declare function flushPromises(): Promise; /** * Spy interface */ interface Spy { (...args: TArgs): TReturn; calls: TArgs[]; restore: () => void; } /** * Spy on a method */ export declare function spyOn(obj: T, method: K): Spy; export {}; //# sourceMappingURL=index.d.ts.map