test(web): add 57 UI component and hook tests with jsdom cleanup

Fix jsdom environment: add esbuild automatic JSX transform and
afterEach cleanup to prevent DOM leakage between tests.

Components: Badge (8), Button (13), FilterBar (5), EmptyState (8),
ConfirmDialog (8), useSelection hook (15).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 17:06:42 +02:00
parent 63db4a09e6
commit c0ba062460
8 changed files with 425 additions and 0 deletions
+3
View File
@@ -2,6 +2,9 @@ import path from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({
esbuild: {
jsx: "automatic",
},
resolve: {
alias: {
"~": path.resolve(__dirname, "./src"),