Skip to content

Commit

Permalink
Avoid MSW warnings in App tests
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Jan 11, 2024
1 parent 6aa2e53 commit c44fe63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/src/App.test.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it } from "vitest";
import { http, HttpResponse } from "msw";
import { beforeEach, describe, expect, it } from "vitest";

import App from "./App.jsx";
import { server } from "./setupTests.js";

describe("App component", () => {
beforeEach(() =>
server.use(http.get("/healthz", () => HttpResponse.text("OK"))),
);

it("shows a link", () => {
render(<App />);

Expand Down

0 comments on commit c44fe63

Please sign in to comment.