From ace13377a24d606af0e0ab97cf38f38ca31c5fad Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Sun, 4 Jan 2026 10:31:37 +1100 Subject: [PATCH] Fix broken tests --- src/game/__tests__/generator.test.ts | 2 +- src/game/__tests__/simulation.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/__tests__/generator.test.ts b/src/game/__tests__/generator.test.ts index 7317b14..287d538 100644 --- a/src/game/__tests__/generator.test.ts +++ b/src/game/__tests__/generator.test.ts @@ -64,7 +64,7 @@ describe('World Generator', () => { inventory: { gold: 0, items: [] } }; - const { world, playerId } = generateWorld(1, runState); + const { world } = generateWorld(1, runState); // Should have player + enemies expect(world.actors.size).toBeGreaterThan(1); diff --git a/src/game/__tests__/simulation.test.ts b/src/game/__tests__/simulation.test.ts index d0b7691..34051c5 100644 --- a/src/game/__tests__/simulation.test.ts +++ b/src/game/__tests__/simulation.test.ts @@ -35,7 +35,7 @@ describe('Combat Simulation', () => { const events = applyAction(world, 1, { type: 'attack', targetId: 2 }); const enemy = world.actors.get(2)!; - expect(enemy.hp).toBeLessThan(10); + expect(enemy.stats!.hp).toBeLessThan(10); // Should have attack event expect(events.some(e => e.type === 'attacked')).toBe(true); @@ -90,7 +90,7 @@ describe('Combat Simulation', () => { }); const world = createTestWorld(actors); - const events = applyAction(world, 1, { type: 'attack', targetId: 2 }); + applyAction(world, 1, { type: 'attack', targetId: 2 }); const enemy = world.actors.get(2)!; const damage = 10 - enemy.stats!. hp;