test: add comprehensive DamageMonitor unit tests (Closes #38) #71

Merged
shahondin1624 merged 1 commits from feature/issue-38-damage-monitor-test into main 2026-03-13 14:12:28 +01:00

Summary

  • Add 24 unit tests for DamageMonitor covering: max calculations (stun/physical/overflow), damage value setting with clamping, wound modifier thresholds, toggle-box mark/heal behavior, physical-to-overflow transition, and createDamageMonitor initialization
  • All tests are pure model-level (no Compose UI), so they run reliably on all targets including JS

Test plan

  • 24 DamageMonitorTest tests pass on JS target
  • Total test count: 77 (up from 53), 18 pre-existing Compose UI failures unchanged
  • Wound modifier verified at 0, -1, -2, -3 thresholds and after healing
  • Overflow verified independently and after filling physical track

Closes #38

## Summary - Add 24 unit tests for DamageMonitor covering: max calculations (stun/physical/overflow), damage value setting with clamping, wound modifier thresholds, toggle-box mark/heal behavior, physical-to-overflow transition, and createDamageMonitor initialization - All tests are pure model-level (no Compose UI), so they run reliably on all targets including JS ## Test plan - [x] 24 DamageMonitorTest tests pass on JS target - [x] Total test count: 77 (up from 53), 18 pre-existing Compose UI failures unchanged - [x] Wound modifier verified at 0, -1, -2, -3 thresholds and after healing - [x] Overflow verified independently and after filling physical track Closes #38
shahondin1624 added 1 commit 2026-03-13 14:12:23 +01:00
24 tests covering max calculations, damage setting with clamping,
wound modifier thresholds (-1 per 3 physical), toggle box behavior
(mark/heal), overflow transitions, and createDamageMonitor initialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shahondin1624 merged commit fb2149b0a7 into main 2026-03-13 14:12:28 +01:00
shahondin1624 deleted branch feature/issue-38-damage-monitor-test 2026-03-13 14:12:28 +01:00
Sign in to join this conversation.