test: verify gateway HTTP arguments · openclaw/openclaw@e5d8a93
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -318,15 +318,16 @@ describe("fuzz: readJsonBodyOrError", () => {
|
318 | 318 | } |
319 | 319 | |
320 | 320 | const maxBytes = randInt(rng, 1, 1 << 20); |
321 | | -const result = await readJsonBodyOrError(makeRequest(), res, maxBytes); |
| 321 | +const req = makeRequest(); |
| 322 | +const result = await readJsonBodyOrError(req, res, maxBytes); |
322 | 323 | if (pick === 0) { |
323 | 324 | expect(result).toEqual(expectedValue); |
324 | 325 | } else { |
325 | 326 | expect(result).toBeUndefined(); |
326 | 327 | expect(res.statusCode).toBe(expectedStatus); |
327 | 328 | expect(end).toHaveBeenCalledWith(expectedBody); |
328 | 329 | } |
329 | | -expect(readJsonBodyMock).toHaveBeenLastCalledWith(expect.anything(), maxBytes); |
| 330 | +expect(readJsonBodyMock).toHaveBeenLastCalledWith(req, maxBytes); |
330 | 331 | } |
331 | 332 | }); |
332 | 333 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。