@dbs-portal/tool-mock
Version:
API mocking toolkit using MSW for DBS Portal development workflows
32 lines • 1.21 kB
TypeScript
/**
* Testing setup utilities for MSW - thin integration layer with Jest/Vitest
*/
import type { RequestHandler } from 'msw';
import type { TestSetupConfig } from './types';
/**
* Setup MSW for Jest - follows MSW's official Jest integration pattern
* This function should be called in your Jest setup file (e.g., setupTests.js)
*/
export declare function setupMSWJest(handlers?: RequestHandler[], _config?: TestSetupConfig): Promise<any>;
/**
* Setup MSW for Vitest - follows Vitest's testing patterns
* This function should be called in your Vitest setup file
*/
export declare function setupMSWVitest(handlers?: RequestHandler[], _config?: TestSetupConfig): Promise<any>;
/**
* Get global test server - simple accessor for Jest/Vitest tests
*/
export declare function getGlobalTestServer(): any | null;
/**
* Check if MSW is setup for testing
*/
export declare function isMSWSetupForTesting(): boolean;
/**
* Generate Jest setup file content for MSW
*/
export declare function generateJestSetupFile(handlers?: string[]): string;
/**
* Generate Vitest setup file content for MSW
*/
export declare function generateVitestSetupFile(handlers?: string[]): string;
//# sourceMappingURL=setup.d.ts.map