test: guard ssrf dispatcher mock call

This commit is contained in:
Peter Steinberger
2026-05-12 05:56:05 +01:00
parent 8084cbc345
commit e89d1b2593

View File

@@ -247,9 +247,7 @@ describe("createPinnedDispatcher", () => {
const callback = vi.fn();
lookup?.("example.com", callback);
const originalLookupCall = originalLookupMock.mock.calls[0];
expect(originalLookupCall?.[0]).toBe("example.com");
expect(typeof originalLookupCall?.[1]).toBe("function");
expect(originalLookupMock).toHaveBeenCalledWith("example.com", expect.any(Function));
expect(callback).toHaveBeenCalledWith(null, "93.184.216.34", 4);
});