test: guard ssrf dispatcher mock call · openclaw/openclaw@e89d1b2
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -247,9 +247,7 @@ describe("createPinnedDispatcher", () => {
|
247 | 247 | const callback = vi.fn(); |
248 | 248 | lookup?.("example.com", callback); |
249 | 249 | |
250 | | -const originalLookupCall = originalLookupMock.mock.calls[0]; |
251 | | -expect(originalLookupCall?.[0]).toBe("example.com"); |
252 | | -expect(typeof originalLookupCall?.[1]).toBe("function"); |
| 250 | +expect(originalLookupMock).toHaveBeenCalledWith("example.com", expect.any(Function)); |
253 | 251 | expect(callback).toHaveBeenCalledWith(null, "93.184.216.34", 4); |
254 | 252 | }); |
255 | 253 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。