test: add unit tests for core game logic utilities
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
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:
@@ -190,8 +190,13 @@ Mana-Loop/
|
||||
│ │ │ ├── store-method-tests/
|
||||
│ │ │ ├── achievements.test.ts
|
||||
│ │ │ ├── bug-fixes.test.ts
|
||||
│ │ │ ├── combat-utils.test.ts
|
||||
│ │ │ ├── computed-stats.test.ts
|
||||
│ │ │ ├── discipline-math.test.ts
|
||||
│ │ │ ├── enemy-generator.test.ts
|
||||
│ │ │ ├── floor-utils.test.ts
|
||||
│ │ │ ├── formatting.test.ts
|
||||
│ │ │ ├── mana-utils.test.ts
|
||||
│ │ │ ├── regression-fixes.test.ts
|
||||
│ │ │ └── spire-utils.test.ts
|
||||
│ │ ├── constants/
|
||||
|
||||
Reference in New Issue
Block a user