From 20db9a87df6bb1b20320ea84604201100a5fe136 Mon Sep 17 00:00:00 2001 From: "mingholy.lmh" Date: Wed, 24 Dec 2025 10:18:03 +0800 Subject: [PATCH] fix: failed unit test cases --- packages/cli/src/nonInteractiveCli.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/nonInteractiveCli.test.ts b/packages/cli/src/nonInteractiveCli.test.ts index 30bc6a62d..07c806ffe 100644 --- a/packages/cli/src/nonInteractiveCli.test.ts +++ b/packages/cli/src/nonInteractiveCli.test.ts @@ -139,6 +139,8 @@ describe('runNonInteractive', () => { setModel: vi.fn(async (model: string) => { currentModel = model; }), + getExperimentalZedIntegration: vi.fn().mockReturnValue(false), + isInteractive: vi.fn().mockReturnValue(false), } as unknown as Config; mockSettings = { @@ -872,7 +874,7 @@ describe('runNonInteractive', () => { 'prompt-id-confirm', ), ).rejects.toThrow( - 'Exiting due to a confirmation prompt requested by the command.', + 'Shell command confirmation is not supported in non-interactive mode. Use YOLO mode or pre-approve commands.', ); }); @@ -927,9 +929,7 @@ describe('runNonInteractive', () => { '/noaction', 'prompt-id-unhandled', ), - ).rejects.toThrow( - 'Exiting due to command result that is not supported in non-interactive mode.', - ); + ).rejects.toThrow('Unknown command result type: unhandled'); }); it('should pass arguments to the slash command action', async () => {