mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 06:11:37 +00:00
test: remove redundant cap-entry exact-limit case
This commit is contained in:
@@ -176,20 +176,6 @@ describe("capEntryCount", () => {
|
|||||||
expect(Object.keys(store)).toHaveLength(2);
|
expect(Object.keys(store)).toHaveLength(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("exactly at limit: no-op", () => {
|
|
||||||
const now = Date.now();
|
|
||||||
const store = makeStore([
|
|
||||||
["a", makeEntry(now)],
|
|
||||||
["b", makeEntry(now - DAY_MS)],
|
|
||||||
["c", makeEntry(now - 2 * DAY_MS)],
|
|
||||||
]);
|
|
||||||
|
|
||||||
const evicted = capEntryCount(store, 3);
|
|
||||||
|
|
||||||
expect(evicted).toBe(0);
|
|
||||||
expect(Object.keys(store)).toHaveLength(3);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("entries without updatedAt are evicted first (lowest priority)", () => {
|
it("entries without updatedAt are evicted first (lowest priority)", () => {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const store: Record<string, SessionEntry> = {
|
const store: Record<string, SessionEntry> = {
|
||||||
|
|||||||
Reference in New Issue
Block a user