From ecdc6446219023f9ddfaf6727e0fd6d6eb07c353 Mon Sep 17 00:00:00 2001 From: Kev Date: Sat, 1 Aug 2026 02:23:24 -0400 Subject: [PATCH] Fix superseded assertion after the ?limit= bisect hook runSnapshot now takes an opts object, so the route call is ('mlb', {}). Asserted as EMPTY rather than loosened to any-object: a stray limit reaching production would silently cap every run, which is the exact bug the hook exists to diagnose. I pushed the previous commit without reading the suite result -- the failure was already on screen. Caught and fixed immediately after. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01QJs13VsyiSKYQP6rj3NNmc --- tests/integration/snapshotRoutes.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/snapshotRoutes.test.js b/tests/integration/snapshotRoutes.test.js index 45864fc..1502def 100644 --- a/tests/integration/snapshotRoutes.test.js +++ b/tests/integration/snapshotRoutes.test.js @@ -38,7 +38,10 @@ describe('POST /api/internal/snapshot/:sport', () => { .set('x-internal-key', 'test-key-123') .send({}); expect(res.status).toBe(200); - expect(snapshot.runSnapshot).toHaveBeenCalledWith('mlb'); + // Opts object added 2026-08-01 for the ?limit= bisect hook. With no + // ?limit the opts must be EMPTY — a stray limit here would silently cap + // production runs, which is the exact bug the hook exists to diagnose. + expect(snapshot.runSnapshot).toHaveBeenCalledWith('mlb', {}); expect(res.body.summary.gradeCount).toBe(3); });