diff --git a/src/room/MuteStates.test.tsx b/src/room/MuteStates.test.tsx index 77ab8ace..0db95a53 100644 --- a/src/room/MuteStates.test.tsx +++ b/src/room/MuteStates.test.tsx @@ -6,8 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { afterAll, afterEach, describe, expect, it, vi } from "vitest"; -import React, { type ReactNode } from "react"; -import { beforeEach } from "vitest"; +import { type ReactNode } from "react"; import { render, screen } from "@testing-library/react"; import { MemoryRouter } from "react-router-dom"; @@ -92,16 +91,12 @@ function mockMediaDevices( } describe("useMuteStates", () => { - beforeEach(() => { - vi.spyOn(React, "useContext").mockReturnValue({}); - }); - afterEach(() => { - vi.restoreAllMocks(); + vi.clearAllMocks(); }); afterAll(() => { - vi.clearAllMocks(); + vi.resetAllMocks(); }); it("disabled when no input devices", () => {