mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 12:15:57 +00:00
- keep headless paste routing aligned with the selected Kiro auth method - validate local callback replay targets and add prompt cancellation safeguards - wire IDC params through the dashboard start route and support equals-form CLI flags
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { describe, expect, it } from 'bun:test';
|
|
import { readOptionValue } from '../../../src/cliproxy/executor/index';
|
|
|
|
describe('readOptionValue', () => {
|
|
it('parses split-token option values', () => {
|
|
expect(readOptionValue(['--kiro-idc-start-url', 'https://d-123.awsapps.com/start'], '--kiro-idc-start-url')).toEqual({
|
|
present: true,
|
|
value: 'https://d-123.awsapps.com/start',
|
|
missingValue: false,
|
|
});
|
|
});
|
|
|
|
it('parses equals-form option values', () => {
|
|
expect(readOptionValue(['--kiro-idc-flow=device'], '--kiro-idc-flow')).toEqual({
|
|
present: true,
|
|
value: 'device',
|
|
missingValue: false,
|
|
});
|
|
});
|
|
|
|
it('marks empty or missing values as invalid', () => {
|
|
expect(readOptionValue(['--kiro-idc-region'], '--kiro-idc-region')).toEqual({
|
|
present: true,
|
|
value: undefined,
|
|
missingValue: true,
|
|
});
|
|
expect(readOptionValue(['--kiro-idc-flow='], '--kiro-idc-flow')).toEqual({
|
|
present: true,
|
|
value: undefined,
|
|
missingValue: true,
|
|
});
|
|
});
|
|
});
|