Skip to content

Commit da7f9a6

Browse files
committed
test: guard runtime capture mock calls
1 parent 5ed2a9a commit da7f9a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/cli/test-runtime-capture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ export function spyRuntimeJson(runtime: Pick<OutputRuntimeEnv, "writeJson">) {
9191

9292
// oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- Test helper lets callers ascribe captured JSON shape.
9393
export function firstWrittenJsonArg<T>(writeJson: MockCallsWithFirstArg): T | null {
94-
return (writeJson.mock.calls[0]?.[0] ?? null) as T | null;
94+
return (writeJson.mock.calls.at(0)?.[0] ?? null) as T | null;
9595
}

0 commit comments

Comments
 (0)