Fix build break in the shoe tests: freshNightState takes (venueId, nightIndex, licensed)

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 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-07-22 03:18:49 +10:00
parent 4118a60aea
commit 7af3732f39

View File

@ -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 },