Skip to content

Commit 1ad766d

Browse files
authored
Merge pull request #5561 from HHS/fix/msw-duplicate-listen
2 parents 006177a + babc7ac commit 1ad766d

5 files changed

Lines changed: 27 additions & 33 deletions

File tree

frontend/bun.lock

Lines changed: 23 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"globals": "17.4.0",
7373
"history": "5.3.0",
7474
"jsdom": "29.0.2",
75-
"msw": "2.12.14",
75+
"msw": "2.13.4",
7676
"prettier": "3.8.3",
7777
"redux-mock-store": "1.5.5",
7878
"sass-loader": "16.0.7",

frontend/public/mockServiceWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* - Please do NOT modify this file.
88
*/
99

10-
const PACKAGE_VERSION = '2.12.14'
10+
const PACKAGE_VERSION = '2.13.4'
1111
const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'
1212
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
1313
const activeClientIds = new Set()

frontend/src/api/opsAPI.test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @vitest-environment node
2-
import { describe, it, expect, vi, beforeAll, beforeEach, afterEach, afterAll } from "vitest";
2+
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
33
import { server } from "../tests/mocks";
44
import { http, HttpResponse } from "msw";
55
import { setupStore } from "../store";
@@ -21,9 +21,7 @@ beforeEach(() => {
2121
});
2222

2323
describe("opsAPI - Agreements Pagination", () => {
24-
beforeAll(() => server.listen());
2524
afterEach(() => server.resetHandlers());
26-
afterAll(() => server.close());
2725

2826
describe("Query Parameter Construction", () => {
2927
it("should add pagination parameters when page and limit provided", async () => {
@@ -793,9 +791,7 @@ describe("opsAPI - Agreements Pagination", () => {
793791
});
794792

795793
describe("opsAPI - Wave 2 high-yield endpoint coverage", () => {
796-
beforeAll(() => server.listen());
797794
afterEach(() => server.resetHandlers());
798-
afterAll(() => server.close());
799795

800796
it("normalizes fiscal year values in getAgreements query params", async () => {
801797
let capturedUrl = "";

frontend/src/api/opsAuthAPI.test.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
import { vi, describe, test, expect, beforeEach, afterEach } from "vitest";
1+
import { vi, describe, test, expect, afterEach } from "vitest";
22
import { waitFor, screen } from "@testing-library/react";
33
import { renderWithProviders } from "../test-utils";
44
import { useGetRolesQuery, opsAuthApi } from "./opsAuthAPI.js";
55
import { server } from "../tests/mocks";
66

7-
// Setup MSW server for integration tests
8-
beforeEach(() => {
9-
server.listen({ onUnhandledRequest: "warn" });
10-
});
11-
127
afterEach(() => {
138
server.resetHandlers();
14-
server.close();
159
});
1610

1711
describe("opsAuthApi", () => {

0 commit comments

Comments
 (0)