Skip to content

Commit e869b9a

Browse files
committed
Run tests in dev mode
1 parent 33a0972 commit e869b9a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/src/setupTests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import "@testing-library/jest-dom";
22
import { vi } from "vitest";
33

4+
// Configure React to run in development mode for tests
5+
(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true;
6+
47
// Mock window.matchMedia
58
Object.defineProperty(window, "matchMedia", {
69
writable: true,

client/vitest.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { defineConfig } from "vite";
2-
import react from "@vitejs/plugin-react";
1+
import { defineConfig } from 'vitest/config';
32

43
export default defineConfig({
5-
plugins: [react()],
64
test: {
75
globals: true,
86
environment: "jsdom",

0 commit comments

Comments
 (0)