test: install Vitest and configure frontend test runner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-10 23:34:14 +00:00
co-authored by Claude Opus 4.6
parent d69c0d6724
commit e6cd18d8ea
4 changed files with 1384 additions and 1 deletions
+1360
View File
File diff suppressed because it is too large Load Diff
+5
View File
@@ -6,6 +6,8 @@
"scripts": {
"start": "./start-dev.sh",
"stop": "./stop-dev.sh",
"test": "vitest run",
"test:watch": "vitest",
"dev": "vite",
"dev:mock": "concurrently \"node mock-backend.js\" \"VITE_AIUI_URL=http://localhost:5173 vite\" \"cd ../../AIUI && pnpm dev 2>/dev/null || echo '[AIUI] Not found at ../../AIUI — chat will show placeholder'\"",
"dev:real": "echo 'Start backend: cd ../core && cargo run --release' && vite",
@@ -30,6 +32,9 @@
},
"devDependencies": {
"@types/node": "^24.10.0",
"@vue/test-utils": "^2.4.6",
"jsdom": "^25.0.1",
"vitest": "^3.1.1",
"@vite-pwa/assets-generator": "^1.0.2",
"@vitejs/plugin-vue": "^6.0.1",
"@vue/tsconfig": "^0.8.1",
+18
View File
@@ -0,0 +1,18 @@
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
test: {
environment: 'jsdom',
globals: true,
root: '.',
passWithNoTests: true,
}
})