Expand test coverage for action bar, bestiary hook, and remaining gaps #24

Closed
opened 2026-03-29 23:53:03 +02:00 by dostulata · 0 comments
Owner

Summary

Add dedicated tests for the remaining low-coverage components and hooks: action bar (36%), use-bestiary (41%), use-undo-redo-shortcuts (47%), bulk-import-toasts (67%), and stat-block-panel (73%). After coverage improves, raise the thresholds in vitest.config.ts to lock in the new floor.

Acceptance Criteria

  • action-bar.tsx has a dedicated test file covering combatant input, add flow, and overflow menu interactions
  • use-action-bar-state.ts has a dedicated test file covering state transitions (idle, searching, bulk operations)
  • use-bestiary.ts has a dedicated test file covering creature fetching, caching, and source management
  • stat-block-panel.tsx has a dedicated test file covering side panel orchestration and swipe-to-dismiss
  • use-undo-redo-shortcuts.ts has a dedicated test file covering keyboard shortcut handling
  • bulk-import-toasts.tsx has a dedicated test file covering toast notification rendering
  • Component and hook coverage thresholds in vitest.config.ts are raised to lock in the new floor
  • pnpm check passes with 0 warnings and 0 errors
## Summary Add dedicated tests for the remaining low-coverage components and hooks: action bar (36%), use-bestiary (41%), use-undo-redo-shortcuts (47%), bulk-import-toasts (67%), and stat-block-panel (73%). After coverage improves, raise the thresholds in `vitest.config.ts` to lock in the new floor. ## Acceptance Criteria - [x] `action-bar.tsx` has a dedicated test file covering combatant input, add flow, and overflow menu interactions - [x] `use-action-bar-state.ts` has a dedicated test file covering state transitions (idle, searching, bulk operations) - [x] `use-bestiary.ts` has a dedicated test file covering creature fetching, caching, and source management - [x] `stat-block-panel.tsx` has a dedicated test file covering side panel orchestration and swipe-to-dismiss - [x] `use-undo-redo-shortcuts.ts` has a dedicated test file covering keyboard shortcut handling - [x] `bulk-import-toasts.tsx` has a dedicated test file covering toast notification rendering - [x] Component and hook coverage thresholds in `vitest.config.ts` are raised to lock in the new floor - [x] `pnpm check` passes with 0 warnings and 0 errors
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dostulata/initiative#24