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
+13
View File
@@ -0,0 +1,13 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./src/test/setup.ts"],
css: false,
include: ["src/__tests__/**/*.test.{ts,tsx}"],
},
});