import { defineConfig } from "vitest/config"; import viteConfig from "./vite.config"; // Use the same resolve aliases as the app; pick a DOM environment for tests // whose filename ends in `.dom.test.{ts,tsx}` so we can mount React via // @testing-library/react. All other tests run in Node, which is faster and // has full pdfjs-dist legacy-worker support. export default defineConfig({ ...viteConfig, test: { environmentMatchGlobs: [ ["**/*.dom.test.{ts,tsx}", "happy-dom"], ], globals: false, }, });