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", () => {