UNPKG

histoire

Version:

A fast story book powered by Vite

21 lines • 1.11 kB
/** * Standalone core of the Vitest mocking bridge used by the generated browser * runtimes: `createMockRpc` (mock resolution) and `createMockInterceptor` * (telling the dev server which modules are mocked). Deliberately free of * `import.meta` so it can be evaluated outside a module — that is what lets the * specs execute it against a fake `fetch` instead of asserting on its source. * * Nothing here ever *waits* on a Vite HMR payload: see * `src/node/vitest-mock-rpc.ts` for the deadlock that makes HMR replies * unusable, and why an HTTP round trip also removes the need for correlation * ids — a response can structurally only settle the request it answers, so * replies can never leak between frames or tabs sharing the dev server. */ export declare const MOCK_RPC_CORE: string; /** * Generated-code snippet embedded verbatim by the two browser runtimes (the * dev preview runtime and the vitest browser runtime): the standalone core * bound to a single instance per browsing context. */ export declare const MOCK_RPC_SNIPPET: string; //# sourceMappingURL=mock-rpc-snippet.d.ts.map