diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 718c1b827a80..0126b8c52b23 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -44,7 +44,7 @@ "lint:fix": "eslint src/ electron/ --fix", "fmt": "prettier --write 'src/**/*.{ts,tsx}' 'electron/**/*.ts' 'vite.config.ts'", "fix": "npm run lint:fix && npm run fmt", - "test:ui": "vitest run --environment jsdom", + "test:ui": "vitest run", "preview": "node scripts/assert-root-install.mjs && vite preview --host 127.0.0.1 --port 4174", "check": "npm run typecheck && npm run test:ui && npm run test:desktop:all" }, diff --git a/apps/desktop/vitest.config.ts b/apps/desktop/vitest.config.ts new file mode 100644 index 000000000000..7ec1b7f80949 --- /dev/null +++ b/apps/desktop/vitest.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from "vitest/config"; +import react from "@vitejs/plugin-react"; +import path from "path"; + +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + "@": path.resolve(__dirname, "./src"), + }, + }, + test: { + environment: "jsdom", + include: ["src/**/*.test.{ts,tsx}"], + globals: true + }, + +});