test: Vitest + RTL component tests with mocked Wails bindings

- vitest + jsdom + @testing-library/react setup
- mocked wailsjs/go/main/MatrixService + runtime
- tests for: LoginScreen, App routing, HomeScreen auto-relogin,
  RoomList, Composer, EventBubble
- pnpm test runs the suite

Frontend coverage for matrix_client_pc (flow 0010 PC client).
This commit is contained in:
2026-05-25 12:20:32 +02:00
parent 36a485ea26
commit 1a2e9b2cc0
12 changed files with 1362 additions and 2 deletions
+11 -2
View File
@@ -6,7 +6,10 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui"
},
"dependencies": {
"@mantine/core": "^7.13.0",
@@ -17,10 +20,16 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/ui": "^2.1.9",
"jsdom": "^29.1.1",
"typescript": "^5.6.2",
"vite": "^5.4.8"
"vite": "^5.4.8",
"vitest": "^2.1.9"
}
}