From 700230c07cd2c68eafd701b8b7c831d483311ee8 Mon Sep 17 00:00:00 2001 From: Shakker Date: Fri, 8 May 2026 20:41:06 +0100 Subject: [PATCH] test: tighten extension script mock assertion --- test/scripts/test-extension.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/scripts/test-extension.test.ts b/test/scripts/test-extension.test.ts index ba2d4152448..20e9b3da69e 100644 --- a/test/scripts/test-extension.test.ts +++ b/test/scripts/test-extension.test.ts @@ -35,7 +35,7 @@ function runScript(args: string[], cwd = process.cwd()) { } function requireFirstMockArg(mock: { mock: { calls: Array<[T, ...unknown[]]> } }): T { - const arg = mock.mock.calls[0]?.[0]; + const [arg] = mock.mock.calls[0] ?? []; if (arg === undefined) { throw new Error("expected first mock call argument"); }