mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 16:10:43 +00:00
test: tighten usage aggregate assertion
This commit is contained in:
@@ -72,7 +72,11 @@ describe("computeFilteredUsage", () => {
|
||||
expect(result).toMatchObject({
|
||||
totalTokens: 300, // 100 + 200
|
||||
});
|
||||
expect(result?.totalCost).toBeCloseTo(0.3); // 0.1 + 0.2
|
||||
expect(result).toBeDefined();
|
||||
if (!result) {
|
||||
throw new Error("expected filtered usage aggregate");
|
||||
}
|
||||
expect(result.totalCost).toBeCloseTo(0.3); // 0.1 + 0.2
|
||||
});
|
||||
|
||||
it("handles reversed range (end < start)", () => {
|
||||
|
||||
Reference in New Issue
Block a user