import solid from "vite-plugin-solid"; import { defineConfig } from "vitest/config"; // Kept apart from vite.config.ts, which exists to serve the Tauri webview and // has nothing to say about tests. export default defineConfig({ plugins: [solid()], resolve: { // Solid ships a development build with the reactivity warnings that make a // failing test explicable, and a browser build that is what runs in the // webview. Without these conditions the server build is picked instead. conditions: ["development", "browser"], dedupe: ["solid-js", "@solidjs/web", "@solidjs/signals"], }, test: { environment: "happy-dom", // Only unit tests. The Playwright specs next door drive a real browser and // must not be picked up by a DOM emulator. include: ["tests/unit/**/*.test.{ts,tsx}"], globals: true, }, });