respira/vitest.config.ts
Jan-Henrik Bruhn f2b01c59e1 feature: Add comprehensive test suite for custom hooks
Add tests for all hooks with @testing-library/react:
- utility hooks: usePrevious, useAutoScroll, useClickOutside
- domain hooks: useErrorPopoverState, useMachinePolling
- platform hooks: useBluetoothDeviceListener

Changes:
- Install @testing-library/react and jsdom for React hook testing
- Configure vitest to use jsdom environment for React testing
- Add 91 tests covering all hook functionality
- Test state management, effects, event listeners, and async behavior
- Verify proper cleanup and edge cases

All tests passing. Coverage includes error states, polling intervals,
click-outside detection, auto-scroll behavior, and IPC integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 12:40:47 +01:00

9 lines
192 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
environment: "jsdom",
include: ["src/**/*.{test,spec}.{js,ts,tsx}"],
},
});