change(desktop): add vitest config for the desktop app
parent
3c408684ea
commit
f382ff84f7
|
|
@ -44,7 +44,7 @@
|
||||||
"lint:fix": "eslint src/ electron/ --fix",
|
"lint:fix": "eslint src/ electron/ --fix",
|
||||||
"fmt": "prettier --write 'src/**/*.{ts,tsx}' 'electron/**/*.ts' 'vite.config.ts'",
|
"fmt": "prettier --write 'src/**/*.{ts,tsx}' 'electron/**/*.ts' 'vite.config.ts'",
|
||||||
"fix": "npm run lint:fix && npm run fmt",
|
"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",
|
"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"
|
"check": "npm run typecheck && npm run test:ui && npm run test:desktop:all"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue