fix: failed unit test cases

This commit is contained in:
mingholy.lmh 2025-12-24 10:18:03 +08:00
parent 8aceddffa2
commit e9a1d9a927

View file

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