From 3a8a110a2eca2e15ad67112a5e642a192cca0726 Mon Sep 17 00:00:00 2001 From: Victor Bodinaud Date: Thu, 8 Oct 2026 12:39:34 +0200 Subject: [PATCH] chore(sim): review nits --- src/sim/catalog.ts | 2 +- tests/sim/transactions.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sim/catalog.ts b/src/sim/catalog.ts index 8e2780d..297ceff 100644 --- a/src/sim/catalog.ts +++ b/src/sim/catalog.ts @@ -30,7 +30,7 @@ export function createCatalog(games: Game[]): Catalog { const byId = new Map(); for (const g of games) { if (byId.has(g.id)) throw new Error(`Duplicate game id: ${g.id}`); - if (g.launchPriceCents <= 0) throw new Error(`Invalid launch price: ${g.id}`); + if (!(g.launchPriceCents > 0)) throw new Error(`Invalid launch price: ${g.id}`); byId.set(g.id, g); } return { games, byId }; diff --git a/tests/sim/transactions.test.ts b/tests/sim/transactions.test.ts index c2832a1..f7dab32 100644 --- a/tests/sim/transactions.test.ts +++ b/tests/sim/transactions.test.ts @@ -166,8 +166,9 @@ describe('requests', () => { recordSatisfiedRequest(s); expect(s.reputation).toBe(20.5); }); +}); -describe('review fixes', () => { +describe('reward and cash edge cases', () => { it('keeps the free trade reward when there is no difference to waive', () => { const s = createNewGame(1); const card = issueCard(s.loyalty); @@ -197,4 +198,3 @@ describe('review fixes', () => { expect(s.day.trades).toBe(0); }); }); -});