Skip to content

Commit b596b9d

Browse files
committed
test(desktop): cover profile cache clearing isolation
1 parent 1921ffe commit b596b9d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎apps/desktop/src/preview/BrowserSession.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,16 @@ describe("BrowserSession", () => {
236236
assert.isUndefined(sessions.get(partition));
237237

238238
yield* browserSessions.getSession("scope-untouched");
239+
const other = yield* browserSessions.getSession("scope-other");
239240
yield* browserSessions.clearCookies([partition]);
240241

241242
const created = sessions.get(partition);
242243
assert.isDefined(created);
243244
assert.strictEqual(created.clearStorageData.mock.calls.length, 1);
245+
assert.deepStrictEqual(created.clearStorageData.mock.calls[0]?.[0], {
246+
storages: ["cookies", "localstorage", "indexdb", "serviceworkers", "cachestorage"],
247+
});
248+
assert.strictEqual(vi.mocked(other.clearStorageData).mock.calls.length, 0);
244249
}).pipe(Effect.provide(layer)),
245250
);
246251
});

0 commit comments

Comments
 (0)