From de14338e89227bc2d3f1651faab66066c3e8d5b3 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Tue, 1 Sep 2026 07:49:24 +0200 Subject: [PATCH] fix: cache test counts the offline index copy (follow-up to #55) --- test/imf.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/imf.test.ts b/test/imf.test.ts index 28012f5..0df00bb 100644 --- a/test/imf.test.ts +++ b/test/imf.test.ts @@ -233,7 +233,10 @@ describe("registry", () => { process.env["SECRYST_CACHE"] = undefined const first = await withBrowserHost(() => resolve("tiny-1.0", indexUrl)) expect([...first.bytes]).toEqual([...fixtureZip]) - expect(store.size).toBe(1) + // zip + the offline index copy (TODO.client-work 05) + expect(store.size).toBe(2) + const zipKeys = [...store.keys()].filter((k) => k.endsWith("tiny.zip")) + expect(zipKeys.length).toBe(1) // channel dies; the cached copy serves, still sha-verified channelUp = false