test: establish frontend gate taxonomy

This commit is contained in:
donghyeon-ka
2026-07-25 20:41:44 +09:00
parent 0a0b7263b3
commit 946cf407b0
11 changed files with 1384 additions and 2 deletions
+23
View File
@@ -0,0 +1,23 @@
import { HttpResponse, http } from "msw";
import { setupServer } from "msw/node";
import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest";
const server = setupServer(
http.get("https://example.test/health", () =>
HttpResponse.json({ success: true, data: { status: "ok" } }),
),
);
beforeAll(() => server.listen({ onUnhandledRequest: "error" }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
describe("integration test level", () => {
it("uses MSW to isolate the HTTP boundary", async () => {
const response = await fetch("https://example.test/health");
await expect(response.json()).resolves.toEqual({
success: true,
data: { status: "ok" },
});
});
});