test: align compaction hook usage expectation
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Test: before_compaction & after_compaction hook wiring
|
||||
*/
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { makeZeroUsageSnapshot } from "../agents/usage.js";
|
||||
import { emitAgentEvent } from "../infra/agent-events.js";
|
||||
|
||||
const hookMocks = vi.hoisted(() => ({
|
||||
@@ -187,8 +188,8 @@ describe("compaction hook wiring", () => {
|
||||
|
||||
const assistantOne = messages[1] as { usage?: unknown };
|
||||
const assistantTwo = messages[2] as { usage?: unknown };
|
||||
expect(assistantOne.usage).toBeUndefined();
|
||||
expect(assistantTwo.usage).toBeUndefined();
|
||||
expect(assistantOne.usage).toEqual(makeZeroUsageSnapshot());
|
||||
expect(assistantTwo.usage).toEqual(makeZeroUsageSnapshot());
|
||||
});
|
||||
|
||||
it("does not clear assistant usage while compaction is retrying", () => {
|
||||
|
||||
Reference in New Issue
Block a user