fix(audit): match export ownership and inventory receipts in browser

This commit is contained in:
2026-10-20 21:42:34 +01:00
parent bb32383bbe
commit dce2d759d7
7 changed files with 75 additions and 9 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ test("shell updates retain unrelated caches and the current app cache", async ()
let activation;
vm.runInNewContext(await readFile(new URL("../sw.js", import.meta.url), "utf8"), {
self: { addEventListener: (type, handler) => handlers.set(type, handler), clients: { claim: async () => {} } },
caches: { keys: async () => ["pipelines-shell-v7", "pipelines-shell-v8", "unrelated-user-cache"], delete: async (key) => deleted.push(key) },
caches: { keys: async () => ["pipelines-shell-v8", "pipelines-shell-v9", "unrelated-user-cache"], delete: async (key) => deleted.push(key) },
});
handlers.get("activate")({ waitUntil: (promise) => { activation = promise; } });
await activation;
assert.deepEqual(deleted, ["pipelines-shell-v7"]);
assert.deepEqual(deleted, ["pipelines-shell-v8"]);
});