mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 04:41:40 +00:00
test: remove redundant all-stale pruning case
This commit is contained in:
@@ -64,20 +64,6 @@ describe("pruneStaleEntries", () => {
|
|||||||
expect(pruned).toBe(0);
|
expect(pruned).toBe(0);
|
||||||
expect(store.noDate).toBeDefined();
|
expect(store.noDate).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("all entries stale results in empty store", () => {
|
|
||||||
const now = Date.now();
|
|
||||||
const store = makeStore([
|
|
||||||
["a", makeEntry(now - 10 * DAY_MS)],
|
|
||||||
["b", makeEntry(now - 20 * DAY_MS)],
|
|
||||||
["c", makeEntry(now - 100 * DAY_MS)],
|
|
||||||
]);
|
|
||||||
|
|
||||||
const pruned = pruneStaleEntries(store, 5 * DAY_MS);
|
|
||||||
|
|
||||||
expect(pruned).toBe(3);
|
|
||||||
expect(Object.keys(store)).toHaveLength(0);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("capEntryCount", () => {
|
describe("capEntryCount", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user