mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 12:15:57 +00:00
16 lines
773 B
TypeScript
16 lines
773 B
TypeScript
import { describe, expect, it } from 'bun:test';
|
|
import { shouldUseCursorCliproxyShortcut } from '../../../src/cursor/constants';
|
|
|
|
describe('cursor CLIProxy shortcut routing', () => {
|
|
it('accepts shortcut flags after leading generic flags', () => {
|
|
expect(shouldUseCursorCliproxyShortcut(['cursor', '--auth'])).toBe(true);
|
|
expect(shouldUseCursorCliproxyShortcut(['cursor', '--verbose', '--auth'])).toBe(true);
|
|
expect(shouldUseCursorCliproxyShortcut(['cursor', '-v', '--accounts'])).toBe(true);
|
|
});
|
|
|
|
it('stops scanning once a positional legacy runtime argument appears', () => {
|
|
expect(shouldUseCursorCliproxyShortcut(['cursor', 'write', '--auth'])).toBe(false);
|
|
expect(shouldUseCursorCliproxyShortcut(['cursor', 'status'])).toBe(false);
|
|
});
|
|
});
|