test: dedupe control ui http mock reads · openclaw/openclaw@8a6c18a
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -42,15 +42,15 @@ describe("handleControlUiHttpRequest", () => {
|
42 | 42 | } |
43 | 43 | |
44 | 44 | function responseBody(end: ReturnType<typeof makeMockHttpResponse>["end"]) { |
45 | | -return String(end.mock.calls.at(0)?.[0] ?? ""); |
| 45 | +return String(end.mock.calls[0]?.[0] ?? ""); |
46 | 46 | } |
47 | 47 | |
48 | 48 | function responseJson(end: ReturnType<typeof makeMockHttpResponse>["end"]) { |
49 | 49 | return JSON.parse(responseBody(end)) as unknown; |
50 | 50 | } |
51 | 51 | |
52 | 52 | function firstEndCallLength(end: ReturnType<typeof makeMockHttpResponse>["end"]) { |
53 | | -return end.mock.calls.at(0)?.length ?? -1; |
| 53 | +return end.mock.calls[0]?.length ?? -1; |
54 | 54 | } |
55 | 55 | |
56 | 56 | function expectNotFoundResponse(params: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。