test: dedupe nostr mock call helper

This commit is contained in:
Peter Steinberger
2026-05-13 10:44:22 +01:00
parent 95901042d4
commit 80190249ec

View File

@@ -102,11 +102,11 @@ async function startGatewayHarness(params: {
}
function mockCallArg(mock: ReturnType<typeof vi.fn>, callIndex = 0, argIndex = 0): unknown {
const call = mock.mock.calls.at(callIndex);
const call = mock.mock.calls[callIndex];
if (!call) {
throw new Error(`Expected mock call ${callIndex}`);
}
return call.at(argIndex);
return call[argIndex];
}
describe("nostr inbound gateway path", () => {