From 2d5bda7f769a23db3ac5df5d2a56c19113dd996c Mon Sep 17 00:00:00 2001 From: Tam Nhu Tran Date: Fri, 3 Apr 2026 01:06:36 -0400 Subject: [PATCH] test(cli): isolate root router completion coverage - stop mocking the completion backend in root-command-router tests - remove cross-file module poisoning that caused flaky CI ordering failures --- tests/unit/commands/root-command-router.test.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/unit/commands/root-command-router.test.ts b/tests/unit/commands/root-command-router.test.ts index b5250d39..d0df53a8 100644 --- a/tests/unit/commands/root-command-router.test.ts +++ b/tests/unit/commands/root-command-router.test.ts @@ -42,12 +42,6 @@ beforeEach(() => { mock.module('../../../src/commands/tokens-command', () => ({ handleTokensCommand: async () => 37, })); - - mock.module('../../../src/commands/completion-backend', () => ({ - handleCompletionCommand: async (args: string[]) => { - calls.push(`complete:${args.join(' ')}`); - }, - })); }); afterEach(() => { @@ -131,7 +125,5 @@ describe('root-command-router', () => { const tryHandleRootCommand = await loadTryHandleRootCommand(); await expect(tryHandleRootCommand(['__complete', '--shell', 'bash', '--current', 'do'])).resolves.toBe(true); - - expect(calls).toEqual(['complete:--shell bash --current do']); }); });