@dbs-portal/core-api
Version:
HTTP client and API utilities for DBS Portal
35 lines • 1.25 kB
TypeScript
/**
* MSW server configuration for tests
*/
/**
* Test origin URL for MSW handlers
* This ensures that all URLs are properly intercepted
*/
export declare const TEST_ORIGIN = "http://localhost:3000";
/**
* Helper function to ensure all handlers have proper URLs
* @param path Path component (e.g., '/api/users')
* @returns Full URL with origin (e.g., 'http://localhost:3000/api/users')
*/
export declare function testUrl(path: string): string;
/**
* Helper to create a GET handler with proper URL
*/
export declare function testGet(path: string, resolver: any): import("msw").HttpHandler;
/**
* Helper to create a POST handler with proper URL
*/
export declare function testPost(path: string, resolver: any): import("msw").HttpHandler;
/**
* Helper to create a PUT handler with proper URL
*/
export declare function testPut(path: string, resolver: any): import("msw").HttpHandler;
/**
* Helper to create a DELETE handler with proper URL
*/
export declare function testDelete(path: string, resolver: any): import("msw").HttpHandler;
/**
* Helper to create a PATCH handler with proper URL
*/
export declare function testPatch(path: string, resolver: any): import("msw").HttpHandler;
//# sourceMappingURL=test-server-config.d.ts.map