fix(tests): remove broken test index files and fix computed-stats import
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s

This commit is contained in:
2026-05-19 12:34:58 +02:00
parent e259484b53
commit 213425e6c9
7 changed files with 12 additions and 70 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
# Circular Dependencies # Circular Dependencies
Generated: 2026-05-19T09:44:29.294Z Generated: 2026-05-19T10:06:50.403Z
Found: 3 circular chain(s) — these MUST be fixed before modifying involved files. Found: 3 circular chain(s) — these MUST be fixed before modifying involved files.
1. Processed 121 files (1.2s) (28 warnings) 1. Processed 121 files (1.3s) (28 warnings)
2. 1) data/equipment/index.ts > data/equipment/utils.ts 2. 1) data/equipment/index.ts > data/equipment/utils.ts
3. 2) data/golems/index.ts > data/golems/utils.ts 3. 2) data/golems/index.ts > data/golems/utils.ts
+6 -1
View File
@@ -1,6 +1,6 @@
{ {
"_meta": { "_meta": {
"generated": "2026-05-19T09:44:27.808Z", "generated": "2026-05-19T10:06:48.891Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.", "description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry." "usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
}, },
@@ -479,9 +479,14 @@
"stores/gameStore.ts": [ "stores/gameStore.ts": [
"constants.ts", "constants.ts",
"data/attunements.ts", "data/attunements.ts",
"effects.ts",
"effects/discipline-effects.ts",
"effects/special-effects.ts", "effects/special-effects.ts",
"effects/upgrade-effects.types.ts",
"stores/attunementStore.ts", "stores/attunementStore.ts",
"stores/combatStore.ts", "stores/combatStore.ts",
"stores/craftingStore.ts",
"stores/discipline-slice.ts",
"stores/gameActions.ts", "stores/gameActions.ts",
"stores/gameLoopActions.ts", "stores/gameLoopActions.ts",
"stores/manaStore.ts", "stores/manaStore.ts",
-3
View File
@@ -249,7 +249,6 @@ Mana-Loop/
│ │ │ ├── gameHooks.ts │ │ │ ├── gameHooks.ts
│ │ │ ├── gameLoopActions.ts │ │ │ ├── gameLoopActions.ts
│ │ │ ├── gameStore.ts │ │ │ ├── gameStore.ts
│ │ │ ├── index.test.ts
│ │ │ ├── index.ts │ │ │ ├── index.ts
│ │ │ ├── manaStore.ts │ │ │ ├── manaStore.ts
│ │ │ ├── prestigeStore.ts │ │ │ ├── prestigeStore.ts
@@ -284,9 +283,7 @@ Mana-Loop/
│ │ ├── crafting-slice.ts │ │ ├── crafting-slice.ts
│ │ ├── crafting-utils.ts │ │ ├── crafting-utils.ts
│ │ ├── effects.ts │ │ ├── effects.ts
│ │ ├── store.test.ts
│ │ ├── store.ts │ │ ├── store.ts
│ │ ├── stores.test.ts
│ │ └── types.ts │ │ └── types.ts
│ └── utils.ts │ └── utils.ts
├── test-results/ ├── test-results/
+4 -7
View File
@@ -2,6 +2,7 @@ import { describe, it, expect } from 'vitest';
import { calculateEffectCapacityCost, ENCHANTMENT_EFFECTS } from '../data/enchantment-effects'; import { calculateEffectCapacityCost, ENCHANTMENT_EFFECTS } from '../data/enchantment-effects';
import { EQUIPMENT_TYPES } from '../data/equipment'; import { EQUIPMENT_TYPES } from '../data/equipment';
import { ATTUNEMENTS_DEF, getAttunementConversionRate } from '../data/attunements'; import { ATTUNEMENTS_DEF, getAttunementConversionRate } from '../data/attunements';
import { getFloorMaxHP } from '../utils';
describe('Enchantment Capacity Validation', () => { describe('Enchantment Capacity Validation', () => {
it('should calculate capacity cost for single stack effects', () => { it('should calculate capacity cost for single stack effects', () => {
@@ -82,23 +83,19 @@ describe('Attunement Mana Type Unlocking', () => {
}); });
describe('Floor HP State', () => { describe('Floor HP State', () => {
it('should have getFloorMaxHP function that returns positive values', async () => { it('should have getFloorMaxHP function that returns positive values', () => {
const { getFloorMaxHP } = await import('../computed-stats');
for (let floor = 1; floor <= 100; floor++) { for (let floor = 1; floor <= 100; floor++) {
const hp = getFloorMaxHP(floor); const hp = getFloorMaxHP(floor);
expect(hp).toBeGreaterThan(0); expect(hp).toBeGreaterThan(0);
} }
}); });
it('should scale HP correctly with floor progression', async () => { it('should scale HP correctly with floor progression', () => {
const { getFloorMaxHP } = await import('../computed-stats');
const hp1 = getFloorMaxHP(1); const hp1 = getFloorMaxHP(1);
const hp10 = getFloorMaxHP(10); const hp10 = getFloorMaxHP(10);
const hp50 = getFloorMaxHP(50); const hp50 = getFloorMaxHP(50);
const hp100 = getFloorMaxHP(100); const hp100 = getFloorMaxHP(100);
expect(hp10).toBeGreaterThan(hp1); expect(hp10).toBeGreaterThan(hp1);
expect(hp50).toBeGreaterThan(hp10); expect(hp50).toBeGreaterThan(hp10);
expect(hp100).toBeGreaterThan(hp50); expect(hp100).toBeGreaterThan(hp50);
-20
View File
@@ -1,20 +0,0 @@
/**
* Unit Tests for Mana Loop Game Logic
*
* This file contains comprehensive tests for the game's core mechanics.
*
* This file has been refactored - individual test suites have been moved to
* the store-tests/ directory. This file re-exports all tests for convenience.
*/
// Re-export all test modules
export * from './store-tests/formatting.test';
export * from './store-tests/floor.test';
export * from './store-tests/mana-calculation.test';
export * from './store-tests/damage-calculation.test';
export * from './store-tests/insight-meditation-incursion.test';
export * from './store-tests/spell-cost.test';
export * from './store-tests/study-speed.test';
export * from './store-tests/game-constants.test';
export * from './store-tests/element-recipes.test';
export * from './store-tests/integration.test';
-18
View File
@@ -1,18 +0,0 @@
/**
* Stores Tests - Main Index
*
* This file re-exports all individual store test files from stores.test.ts
* Each test file is focused on a specific store or functionality.
*
* Original file: stores.test.ts (494 lines)
* Refactored into 6 smaller test files.
*/
import './stores-split-tests/mana-store.test';
import './stores-split-tests/skill-store.test';
import './stores-split-tests/prestige-store.test';
import './stores-split-tests/combat-store.test';
import './stores-split-tests/ui-store.test';
import './stores-split-tests/integration.test';
console.log('✅ All stores tests complete (refactored from 494 lines to 6 focused test files).');
-19
View File
@@ -1,19 +0,0 @@
/**
* Stores Index Tests - Main Index
*
* This file re-exports all individual test files for the stores index.
* Each test file is focused on a specific area of functionality.
*
* Original file: stores/index.test.ts (571 lines)
* Refactored into 7 smaller test files.
*/
import '../index-tests/utility-functions.test';
import '../index-tests/mana-calculations.test';
import '../index-tests/combat-calculations.test';
import '../index-tests/study-speed.test';
import '../index-tests/meditation-insight-incursion.test';
import '../index-tests/spell-cost.test';
import '../index-tests/definitions.test';
console.log('✅ All stores index tests complete (refactored from 571 lines to 7 focused test files).');