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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QJs13VsyiSKYQP6rj3NNmc
This commit is contained in:
Kev
2026-08-01 02:23:24 -04:00
parent 11b0139481
commit ecdc644621
+4 -1
View File
@@ -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);
});