feat(ai-character): 리소스 관리 기반 정비
This commit is contained in:
@@ -17,13 +17,14 @@ describe("startMockWorker", () => {
|
||||
test("starts browser MSW with an error policy for unhandled requests", async () => {
|
||||
// Given
|
||||
vi.stubEnv("VITE_API_BASE_URL", "https://api.example.com");
|
||||
const startOptions = { onUnhandledRequest: "error" };
|
||||
const startOptions = { onUnhandledRequest: "error", quiet: true };
|
||||
|
||||
// When
|
||||
await startMockWorker();
|
||||
|
||||
// Then
|
||||
expect(setupWorkerMock).toHaveBeenCalledWith(expect.anything(), expect.anything(), expect.anything());
|
||||
expect(setupWorkerMock).toHaveBeenCalled();
|
||||
expect(setupWorkerMock.mock.calls[0]?.length).toBeGreaterThan(0);
|
||||
expect(workerStart).toHaveBeenCalledWith(startOptions);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user