forked from WikiDeck/wikideck
More cards
This commit is contained in:
@@ -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) });
|
||||
|
||||
Reference in New Issue
Block a user