aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/test/render.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/test/render.test.tsx')
-rw-r--r--frontend/test/render.test.tsx23
1 files changed, 3 insertions, 20 deletions
diff --git a/frontend/test/render.test.tsx b/frontend/test/render.test.tsx
index c3f4ea968..097b93e49 100644
--- a/frontend/test/render.test.tsx
+++ b/frontend/test/render.test.tsx
@@ -1,27 +1,10 @@
import { render } from "@testing-library/react";
import { StrictMode } from "react";
-import { describe, it, vitest } from "vitest";
+import { describe, it } from "vitest";
import { Main } from "../src/main";
-describe("render test", () => {
- beforeAll(() => {
- // From https://stackoverflow.com/questions/39830580/jest-test-fails-typeerror-window-matchmedia-is-not-a-function
- Object.defineProperty(window, "matchMedia", {
- writable: true,
- value: vitest.fn().mockImplementation((query) => ({
- matches: false,
- media: query,
- onchange: null,
- addListener: vitest.fn(), // Deprecated
- removeListener: vitest.fn(), // Deprecated
- addEventListener: vitest.fn(),
- removeEventListener: vitest.fn(),
- dispatchEvent: vitest.fn(),
- })),
- });
- });
-
- it("render without crashing", () => {
+describe("App", () => {
+ it("should render without crash", () => {
render(
<StrictMode>
<Main />