test: dedupe launchd handoff mock read

This commit is contained in:
Peter Steinberger
2026-05-13 05:40:55 +01:00
parent 4e8d9d26a9
commit 11919c8a97

View File

@@ -16,7 +16,7 @@ import { scheduleDetachedLaunchdRestartHandoff } from "./launchd-restart-handoff
type SpawnCall = [string, string[], { env: Record<string, string | undefined> }];
function requireSpawnCall(callIndex = 0): SpawnCall {
const call = spawnMock.mock.calls.at(callIndex);
const call = spawnMock.mock.calls[callIndex];
if (!call) {
throw new Error(`expected spawn call ${callIndex}`);
}