test: dedupe diagnostics mock reads · openclaw/openclaw@ec7962f
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
File tree
src/gateway/server-methods
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,7 +48,8 @@ describe("diagnostics gateway methods", () => {
|
48 | 48 | }); |
49 | 49 | |
50 | 50 | expect(respond).toHaveBeenCalledTimes(1); |
51 | | -expect(respond.mock.calls.at(0)).toEqual([ |
| 51 | +const firstRespondCall = respond.mock.calls[0]; |
| 52 | +expect(firstRespondCall).toEqual([ |
52 | 53 | true, |
53 | 54 | { |
54 | 55 | generatedAt: now.toISOString(), |
@@ -84,9 +85,7 @@ describe("diagnostics gateway methods", () => {
|
84 | 85 | }, |
85 | 86 | undefined, |
86 | 87 | ]); |
87 | | -expect( |
88 | | -Object.keys(respond.mock.calls.at(0)?.[1] as Record<string, unknown>).toSorted(), |
89 | | -).toEqual([ |
| 88 | +expect(Object.keys(firstRespondCall?.[1] as Record<string, unknown>).toSorted()).toEqual([ |
90 | 89 | "capacity", |
91 | 90 | "count", |
92 | 91 | "dropped", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。