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:
@@ -38,7 +38,10 @@ describe('POST /api/internal/snapshot/:sport', () => {
|
|||||||
.set('x-internal-key', 'test-key-123')
|
.set('x-internal-key', 'test-key-123')
|
||||||
.send({});
|
.send({});
|
||||||
expect(res.status).toBe(200);
|
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);
|
expect(res.body.summary.gradeCount).toBe(3);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user