mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 22:17:20 +00:00
fix(proxy): handle end-of-options parsing
This commit is contained in:
1 parent
f4f33b0b5f
commit
2a80f7b1c1
2 files changed
+19
-1
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from 'bun:test';
|
||||
import { findPositionalArg } from '../../../src/commands/proxy-command';
|
||||
|
||||
describe('findPositionalArg', () => {
|
||||
it('skips option values before returning the first positional argument', () => {
|
||||
expect(findPositionalArg(['--port', '3456', 'ccg'], ['--port'])).toBe('ccg');
|
||||
});
|
||||
|
||||
it('treats arguments after -- as positional', () => {
|
||||
expect(findPositionalArg(['--', '--port', '3456'], ['--port'])).toBe('--port');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user