From 7af3732f39d5caa587ed3e5a54840edf6cadf3ca Mon Sep 17 00:00:00 2001 From: type-two Date: Wed, 22 Jul 2026 03:18:49 +1000 Subject: [PATCH] Fix build break in the shoe tests: freshNightState takes (venueId, nightIndex, licensed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vitest does not typecheck, so these passed under `npm test` while `npm run build` failed. The gate is lint AND build AND test for exactly this reason — run it in that order after touching tests, not before. Co-Authored-By: Claude Fable 5 --- tests/nightSummary.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/nightSummary.test.ts b/tests/nightSummary.test.ts index 0bcd531..e75f9f1 100644 --- a/tests/nightSummary.test.ts +++ b/tests/nightSummary.test.ts @@ -132,15 +132,15 @@ describe('shouldRecordStrike', () => { describe('the booth shoe', () => { it('is real money — cash taken at the decks reaches the pay line', () => { - const without = nightCash(log({ pocketCash: 0 }), freshNightState('theRoyal', 80)); - const withTips = nightCash(log({ pocketCash: 50 }), freshNightState('theRoyal', 80)); + const without = nightCash(log({ pocketCash: 0 }), freshNightState('theRoyal', 0, 80)); + const withTips = nightCash(log({ pocketCash: 50 }), freshNightState('theRoyal', 0, 80)); expect(withTips - without).toBe(50); }); it('cannot be eaten by strikes — a deduction takes the wage, not your pocket', () => { // Three strikes wipes the wage to the Math.max(0, ...) floor. Whatever a // punter physically handed you is still in your pocket at the end of it. - const state = freshNightState('theRoyal', 80); + const state = freshNightState('theRoyal', 0, 80); state.heatStrikes = [ { reason: 'a', deferred: true }, { reason: 'b', deferred: true },