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:
2026-06-03 22:35:55 +02:00
parent dcfddc88c7
commit 66d0624279
10 changed files with 140 additions and 1 deletions
+10
View File
@@ -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());