From ef44aa71d3ebc878b78167bf1e7ed32f3aa8a48f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 13 May 2026 05:04:50 +0100 Subject: [PATCH] test: dedupe ssrf dispatcher mock read --- src/infra/net/ssrf.dispatcher.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/infra/net/ssrf.dispatcher.test.ts b/src/infra/net/ssrf.dispatcher.test.ts index 001ac72576a..9346d6b3021 100644 --- a/src/infra/net/ssrf.dispatcher.test.ts +++ b/src/infra/net/ssrf.dispatcher.test.ts @@ -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 {