mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-15 20:20:09 +00:00
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
This commit is contained in:
@@ -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']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user