test: dedupe ssrf dispatcher mock read

This commit is contained in:
Peter Steinberger
2026-05-13 05:04:50 +01:00
parent a6160b99d9
commit ef44aa71d3

View File

@@ -73,8 +73,8 @@ function createDispatcherWithPinnedOverride(lookup: PinnedHostname["lookup"]) {
},
});
return (agentCtor.mock.calls.at(-1)?.[0] as { connect?: { lookup?: PinnedHostname["lookup"] } })
?.connect?.lookup;
const call = agentCtor.mock.calls[agentCtor.mock.calls.length - 1];
return (call?.[0] as { connect?: { lookup?: PinnedHostname["lookup"] } })?.connect?.lookup;
}
function requireRecord(value: unknown, label: string): Record<string, unknown> {