diff --git a/src/commands/doctor-security.test.ts b/src/commands/doctor-security.test.ts index 3d04f006726..f1704968d47 100644 --- a/src/commands/doctor-security.test.ts +++ b/src/commands/doctor-security.test.ts @@ -65,7 +65,7 @@ describe("noteSecurityWarnings gateway exposure", () => { } }); - const lastMessage = () => String(note.mock.calls.at(-1)?.[0] ?? ""); + const lastMessage = () => String(note.mock.calls[note.mock.calls.length - 1]?.[0] ?? ""); async function withExecApprovalsFile( file: Record,