This commit is contained in:
+1
-26
@@ -247,7 +247,7 @@ async function accountFingerprint(id: string) {
|
||||
return Buffer.from(bytes).toString("hex");
|
||||
}
|
||||
|
||||
test("reads old cached snapshots without session estimates and removes excluded windows", async () => {
|
||||
test("reads cached snapshots and removes excluded windows", async () => {
|
||||
const cached = {
|
||||
account: await accountFingerprint("account-one"),
|
||||
latest: {
|
||||
@@ -284,30 +284,6 @@ test("reads old cached snapshots without session estimates and removes excluded
|
||||
},
|
||||
],
|
||||
},
|
||||
sessions: {
|
||||
root: {
|
||||
"codex:primary": {
|
||||
resetsAt: 2_000_000_000_000,
|
||||
lastUsed: 12.5,
|
||||
consumed: 2,
|
||||
},
|
||||
"CODEX-BENGALFOX:primary": {
|
||||
resetsAt: 2_000_000_000_000,
|
||||
lastUsed: 80,
|
||||
consumed: 40,
|
||||
},
|
||||
"codex_luna_reserve:primary": {
|
||||
resetsAt: 2_000_000_000_000,
|
||||
lastUsed: 60,
|
||||
consumed: 30,
|
||||
},
|
||||
"codex_luna:primary": {
|
||||
resetsAt: 2_000_000_000_000,
|
||||
lastUsed: 20,
|
||||
consumed: 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const result = fixture(
|
||||
{
|
||||
@@ -328,7 +304,6 @@ test("reads old cached snapshots without session estimates and removes excluded
|
||||
"codex_luna:primary",
|
||||
]);
|
||||
expect(status?.windows[0]).not.toHaveProperty("sessionConsumed");
|
||||
expect(result.stored.get("chatgpt-quota")).not.toHaveProperty("sessions");
|
||||
expect(result.calls()).toBe(1);
|
||||
await result.tracker.dispose();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user