| 1 |
/* eslint-disable import/no-extraneous-dependencies */ |
| 2 |
import { defineConfig } from "vitest/config"; |
| 3 |
|
| 4 |
// Standalone config (separate from vite.config.js) so the PWA plugin isn't loaded during tests. |
| 5 |
// Tests run in the default "node" environment -- see src/test/setup.js for the minimal window stub |
| 6 |
// that lets the pure-logic modules import without jsdom. |
| 7 |
export default defineConfig({ |
| 8 |
test: { |
| 9 |
environment: "node", |
| 10 |
setupFiles: ["./src/test/setup.js"], |
| 11 |
include: ["src/**/*.test.{js,jsx}"], |
| 12 |
globals: false, // explicit `import { describe, it, expect } from "vitest"` -> no eslint env change |
| 13 |
}, |
| 14 |
}); |