import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react"; import { playwright } from "@vitest/browser-playwright"; /** * Headed browser runs — so you can watch the UI under test. * Usage: npm run test:headed */ export default defineConfig({ plugins: [react()], test: { globals: true, setupFiles: ["./src/test/setup.ts"], include: ["src/**/*.test.{ts,tsx}"], browser: { enabled: true, provider: playwright({ launchOptions: { headless: false, slowMo: 250, }, }), instances: [{ browser: "chromium" }], headless: false, viewport: { width: 900, height: 700 }, }, // Keep Chrome open longer between files so you can watch fileParallelism: false, sequence: { concurrent: false }, }, });