2026-03-10 23:34:14 +00:00
|
|
|
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,
|
2026-05-05 11:29:18 -04:00
|
|
|
exclude: ['e2e/**', 'node_modules/**', '**/._*'],
|
test: achieve 80%+ branch/function coverage on frontend logic (E2E-03)
515 tests across 38 files. Branch coverage 88%, function coverage 83%
on testable logic (stores, composables, api, utils, services, router).
New test files: websocket, useLoginSounds, useMobileBackButton,
useControllerNav, routes. Extended: rpc-client (99.5%), container store
(100%). Fixed: useNavSounds AudioContext mock, type errors across tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:18:37 +00:00
|
|
|
coverage: {
|
|
|
|
|
provider: 'v8',
|
|
|
|
|
reporter: ['text', 'text-summary'],
|
|
|
|
|
include: [
|
|
|
|
|
'src/api/*.ts',
|
|
|
|
|
'src/stores/*.ts',
|
|
|
|
|
'src/composables/*.ts',
|
|
|
|
|
'src/utils/*.ts',
|
|
|
|
|
'src/services/*.ts',
|
|
|
|
|
'src/router/*.ts',
|
|
|
|
|
],
|
|
|
|
|
exclude: ['src/**/__tests__/**', 'src/**/*.d.ts', 'src/main.ts'],
|
|
|
|
|
thresholds: {
|
|
|
|
|
branches: 80,
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-10 23:34:14 +00:00
|
|
|
}
|
|
|
|
|
})
|