test: add unit tests for core game logic utilities
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s

Add 5 new test files covering pure utility functions:
- discipline-math.test.ts (42 tests): stat bonus, mana drain, perk tiers,
  discipline activation/progression, unlocked perks, discipline stats
- formatting.test.ts (35 tests): fmt, fmtDec, formatSpellCost,
  getSpellCostColor, formatStudyTime, formatHour
- floor-utils.test.ts (13 tests): getFloorMaxHP, getFloorElement
- combat-utils.test.ts (37 tests): getElementalBonus, getBoonBonuses,
  getIncursionStrength, canAffordSpellCost, deductSpellCost
- mana-utils.test.ts (36 tests): computeMaxMana, computeRegen,
  computeClickMana, getMeditationBonus, computeEffectiveRegenForDisplay

Total: 163 new tests, all passing. No existing tests broken.
This commit is contained in:
2026-05-20 13:01:15 +02:00
parent cba42e01ff
commit a49b8a8bef
8 changed files with 1306 additions and 32 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
# Circular Dependencies
Generated: 2026-05-20T10:00:51.281Z
Generated: 2026-05-20T10:36:04.388Z
Found: 1 circular chain(s) — these MUST be fixed before modifying involved files.
1. Processed 127 files (1.4s) (4 warnings)
1. Processed 125 files (1.3s) (4 warnings)
## How to fix
1. Identify which import in the chain can be extracted to a shared types/utils file.