Configure browsing session pacing and size

This commit is contained in:
jjbrunton committed 2026-08-11 22:17:18 +01:00
1 parent 1fd154e1eb
commit e890f74478
14 files changed
+201 -56

No files matched your search

+3 -1
View File
@@ -265,12 +265,13 @@ describe('growth route', () => {
dailyTargetMin: 4,
dailyTargetMax: 8,
minimumGapMs: 3_600_000,
selectionsPerSession: 4,
});
expect(status).toBe(200);
const parsed = GrowthAccountResponseSchema.parse(json);
expect(parsed.account.browsing).toMatchObject({
settings: { enabled: true, dailyTargetMin: 4, dailyTargetMax: 8 },
settings: { enabled: true, dailyTargetMin: 4, dailyTargetMax: 8, selectionsPerSession: 4 },
noVotesSubmitted: true,
});
expect(pushed).toContainEqual({
@@ -281,6 +282,7 @@ describe('growth route', () => {
it.each([
{ dailyTargetMax: 13 },
{ minimumGapMs: 44 * 60_000 },
{ selectionsPerSession: 13 },
{ postWeight: 0, commentWeight: 0 },
{ nextDueAt: 123 },
])('rejects unsafe or non-operator settings %o', async (body) => {