test(web): MSW harness with typed handlers, fixtures, and client tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1 +1,11 @@
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
import { afterAll, afterEach } from "vitest";
|
||||
|
||||
import { server } from "./server";
|
||||
|
||||
// Start MSW at module level so its fetch patch is in place before any test
|
||||
// module captures globalThis.fetch via openapi-fetch's createClient().
|
||||
server.listen({ onUnhandledRequest: "error" });
|
||||
|
||||
afterEach(() => server.resetHandlers());
|
||||
afterAll(() => server.close());
|
||||
|
||||
Reference in New Issue
Block a user