UNPKG

e2ed

Version:

E2E testing framework over Playwright

11 lines (10 loc) 681 B
import type { WebSocketMockFunction, WebSocketRouteClassTypeWithGetParamsFromUrl } from '../../types/internal'; /** * Mock WebSocket for some API route. * Applicable only for routes with the `getParamsFromUrlOrThrow` method. * The mock is applied to a WebSocket that matches the route by url * (by methods `getParamsFromUrlOrThrow` and `isMatchUrl`). */ export declare const mockWebSocketRoute: <RouteParams, SomeRequest, SomeResponse>(Route: WebSocketRouteClassTypeWithGetParamsFromUrl<RouteParams, SomeRequest, SomeResponse>, webSocketMockFunction: WebSocketMockFunction<RouteParams, SomeRequest, SomeResponse>, { skipLogs }?: { skipLogs?: boolean; }) => Promise<void>;