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
+4 -7
View File
@@ -2,6 +2,7 @@ import { describe, it, expect } from 'vitest';
import { calculateEffectCapacityCost, ENCHANTMENT_EFFECTS } from '../data/enchantment-effects';
import { EQUIPMENT_TYPES } from '../data/equipment';
import { ATTUNEMENTS_DEF, getAttunementConversionRate } from '../data/attunements';
import { getFloorMaxHP } from '../utils';
describe('Enchantment Capacity Validation', () => {
it('should calculate capacity cost for single stack effects', () => {
@@ -82,23 +83,19 @@ describe('Attunement Mana Type Unlocking', () => {
});
describe('Floor HP State', () => {
it('should have getFloorMaxHP function that returns positive values', async () => {
const { getFloorMaxHP } = await import('../computed-stats');
it('should have getFloorMaxHP function that returns positive values', () => {
for (let floor = 1; floor <= 100; floor++) {
const hp = getFloorMaxHP(floor);
expect(hp).toBeGreaterThan(0);
}
});
it('should scale HP correctly with floor progression', async () => {
const { getFloorMaxHP } = await import('../computed-stats');
it('should scale HP correctly with floor progression', () => {
const hp1 = getFloorMaxHP(1);
const hp10 = getFloorMaxHP(10);
const hp50 = getFloorMaxHP(50);
const hp100 = getFloorMaxHP(100);
expect(hp10).toBeGreaterThan(hp1);
expect(hp50).toBeGreaterThan(hp10);
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).');