test: tighten usage metrics assertion · openclaw/openclaw@97a5277
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -85,7 +85,7 @@ describe("buildPeakErrorHours", () => {
|
85 | 85 | // but we can verify error rates and sub info. |
86 | 86 | const highestRate = result[0]; |
87 | 87 | // hour 0: 5/10 = 50%, hour 23: 4/8 = 50%, hour 9: 3/15 = 20%, hour 1: 2/20 = 10% |
88 | | -expect(highestRate).toMatchObject({ value: expect.stringMatching(/50\.00%/) }); |
| 88 | +expect(highestRate?.value).toMatch(/50\.00%/); |
89 | 89 | }); |
90 | 90 | |
91 | 91 | it("aggregates multiple quarter-hour buckets into the same hour in UTC mode", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。