change(desktop): add vitest config for the desktop app

This commit is contained in:
ethernet 2026-07-08 19:23:33 -04:00
parent 3c408684ea
commit f382ff84f7
2 changed files with 19 additions and 1 deletions

View file

@ -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"
},

View file

@ -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
},
});