More cards

This commit is contained in:
2026-10-19 18:52:49 -04:00
parent 716c9612cc
commit 0b9061372b
26 changed files with 549 additions and 201 deletions
+9
View File
@@ -186,6 +186,15 @@ test('six-hour TTL, deduplication and mutation isolation', async () => {
assert.equal(calls.length, 4);
});
test('fresh enrichment bypasses the display cache for mint-time snapshots', async () => {
const { service, calls } = fixture();
await service.get(736);
const pinned = await service.getFresh(736);
assert.equal(calls.length, 4); // Each lookup makes one metadata and one pageview request.
assert.equal(pinned.pageId, 736);
assert.equal(pinned.pageviews.status, 'available');
});
test('LRU bound and configured TTL are enforced', async () => {
let now = JANUARY.getTime();
const { service, calls } = fixture({ maxEntries: 2, ttlMs: 100, now: () => new Date(now) });