From 10c2a8a31100ffd345f8cd05468d40eb79a0595b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 11 May 2026 20:52:25 +0100 Subject: [PATCH] test: guard message helper nullish deps --- src/cli/program/message/helpers.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cli/program/message/helpers.test.ts b/src/cli/program/message/helpers.test.ts index 97abd764ae6..43782529757 100644 --- a/src/cli/program/message/helpers.test.ts +++ b/src/cli/program/message/helpers.test.ts @@ -109,10 +109,12 @@ function expectMessageCommandOptions(expected: Record, callInde for (const [key, expectedValue] of Object.entries(expected)) { expect(options[key], `messageCommand options.${key}`).toEqual(expectedValue); } - expect(call[1], "messageCommand runtime").not.toBeNull(); - expect(call[1], "messageCommand runtime").not.toBeUndefined(); - expect(call[2], "messageCommand deps").not.toBeNull(); - expect(call[2], "messageCommand deps").not.toBeUndefined(); + if (call[1] == null) { + throw new Error("expected messageCommand runtime"); + } + if (call[2] == null) { + throw new Error("expected messageCommand deps"); + } } describe("runMessageAction", () => {