fix(proxy): handle end-of-options parsing

This commit is contained in:
Wooseong Kim committed 2026-04-20 14:27:09 +09:00
1 parent f4f33b0b5f
commit 2a80f7b1c1
2 files changed
+19 -1

No files matched your search

+12
View File
@@ -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');
});
});