chore: add test infrastructure and update risk router

- Add vitest config and unit tests for components, api, stores
- Add Playwright e2e test for user flows
- Add backend test files
- Update risk.py with LOD grid KDTree optimization
This commit is contained in:
2026-06-09 12:54:55 +08:00
parent 8ddd8e87bb
commit f092c3c550
14 changed files with 2910 additions and 12 deletions

19
frontend/vitest.config.ts Normal file
View File

@@ -0,0 +1,19 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: [],
include: ['src/**/*.test.{ts,tsx}'],
},
});