UNPKG

@dbs-portal/core-api

Version:

HTTP client and API utilities for DBS Portal

42 lines 1.12 kB
/** * MSW setup and initialization */ import type { RequestHandler } from 'msw'; import type { MockSetupOptions } from './types'; /** * Setup MSW based on environment */ export declare function setupMocks(options?: MockSetupOptions): Promise<void>; /** * Teardown MSW */ export declare function teardownMocks(): Promise<void>; /** * Restart MSW with new configuration */ export declare function restartMocks(options?: MockSetupOptions): Promise<void>; /** * Add handlers to existing MSW instance */ export declare function addHandlers(...handlers: RequestHandler[]): void; /** * Reset handlers to original state */ export declare function resetHandlers(): void; /** * Restore original handlers */ export declare function restoreHandlers(): void; /** * Check if MSW is set up */ export declare function isMswSetup(): boolean; /** * Get current MSW instance */ export declare function getMswInstance(): any; /** * Auto-setup MSW based on environment (convenience function) */ export declare function autoSetupMocks(customHandlers?: RequestHandler[]): Promise<void>; //# sourceMappingURL=setup.d.ts.map