mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-17 18:13:43 +00:00
fix(auth): harden shared-context isolation edge cases
This commit is contained in:
1 parent
3b7395b229
commit
7d5e604e53
12 files changed
+417
-21
No files matched your search
@@ -31,4 +31,18 @@ describe('auth command args parsing', () => {
|
||||
expect(parsed.profileName).toBe('work');
|
||||
expect(parsed.contextGroup).toBe('');
|
||||
});
|
||||
|
||||
it('flags empty inline context group as empty string', () => {
|
||||
const parsed = parseArgs(['work', '--context-group=']);
|
||||
|
||||
expect(parsed.profileName).toBe('work');
|
||||
expect(parsed.contextGroup).toBe('');
|
||||
});
|
||||
|
||||
it('tracks unknown flags and keeps positional profile intact', () => {
|
||||
const parsed = parseArgs(['--foo', 'bar', 'work']);
|
||||
|
||||
expect(parsed.profileName).toBe('work');
|
||||
expect(parsed.unknownFlags).toEqual(['--foo']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user