From f685a8a53d476935b8d0780fba411dafce04bd53 Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Thu, 14 May 2026 14:30:27 +0200 Subject: [PATCH] test(cli): drop empty-selection warning assertion from setup test The empty-selection retry/warning loop in `chooseDrivers` was removed in favor of `multiselect`'s `required: true`, so the legacy warning string is unreachable. Update the test to assert the simpler back-from-selection return-to-embeddings flow. --- packages/cli/src/setup.test.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/setup.test.ts b/packages/cli/src/setup.test.ts index b0c28d7c..7e479c0e 100644 --- a/packages/cli/src/setup.test.ts +++ b/packages/cli/src/setup.test.ts @@ -1094,7 +1094,7 @@ describe('setup status', () => { expect(embeddings).toHaveBeenCalledTimes(1); }); - it('lets Back from database selection return to embedding setup after an empty selection warning', async () => { + it('lets Back from database selection return to embedding setup', async () => { const testIo = makeIo(); const modelResults = [ { status: 'ready' as const, projectDir: tempDir }, @@ -1106,9 +1106,8 @@ describe('setup status', () => { { status: 'back' as const, projectDir: tempDir }, ]; const embeddings = vi.fn(async () => embeddingResults.shift() ?? { status: 'back' as const, projectDir: tempDir }); - const databaseMultiselectValues = [[], ['back']]; const databasePrompts = { - multiselect: vi.fn(async () => databaseMultiselectValues.shift() ?? ['back']), + multiselect: vi.fn(async () => ['back']), select: vi.fn(async () => 'back'), text: vi.fn(), password: vi.fn(), @@ -1142,9 +1141,6 @@ describe('setup status', () => { ).resolves.toBe(0); expect(databasePrompts.select).not.toHaveBeenCalled(); - expect(testIo.stdout()).toContain( - 'KTX cannot work without at least one database. Select a database or press Escape to go back.', - ); expect(embeddings).toHaveBeenCalledTimes(2); expect(embeddings).toHaveBeenNthCalledWith(2, expect.objectContaining({ forcePrompt: true }), testIo.io); expect(testIo.stderr()).not.toContain('No databases selected.');