From 9ac4594383154fbcf40f43d69dc7eaa63b6ac49c Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Wed, 13 May 2026 14:33:41 +0200 Subject: [PATCH] test(cli): update connection smoke coverage --- packages/cli/src/standalone-smoke.test.ts | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/packages/cli/src/standalone-smoke.test.ts b/packages/cli/src/standalone-smoke.test.ts index c2b7386c..c6fefd96 100644 --- a/packages/cli/src/standalone-smoke.test.ts +++ b/packages/cli/src/standalone-smoke.test.ts @@ -307,7 +307,7 @@ describe('standalone built ktx CLI smoke', () => { }); }); - it('adds a redacted Notion connection through the built binary', async () => { + it('rejects the removed connection add command through the built binary', async () => { const projectDir = join(tempDir, 'notion-project'); const init = await runSetupNewProject(projectDir); expectProjectStderr(init, projectDir); @@ -327,23 +327,17 @@ describe('standalone built ktx CLI smoke', () => { '5', ]); - expectProjectStderr(add, projectDir); - expect(add.stdout).toContain('Connection: notion-main'); - expect(add.stdout).toContain('Driver: notion'); + expect(add.code).toBe(1); + expect(add.stdout).toBe(''); + expect(add.stderr).toContain("unknown command 'add'"); const yaml = await readFile(join(projectDir, 'ktx.yaml'), 'utf-8'); - expect(yaml).toContain('driver: notion'); - expect(yaml).toContain('auth_token_ref: env:NOTION_TOKEN'); - expect(yaml).toContain('crawl_mode: all_accessible'); - expect(yaml).toContain('max_pages_per_run: 5'); + expect(yaml).not.toContain('driver: notion'); + expect(yaml).not.toContain('auth_token_ref: env:NOTION_TOKEN'); expect(yaml).not.toContain('ntn_'); const parsed = parseKtxProjectConfig(yaml); - expect(parsed.connections['notion-main']).toMatchObject({ - driver: 'notion', - auth_token_ref: 'env:NOTION_TOKEN', - crawl_mode: 'all_accessible', - }); + expect(parsed.connections['notion-main']).toBeUndefined(); }); });