fix(auth): require resource mode value

This commit is contained in:
Tam Nhu Tran committed 2026-05-08 23:36:12 -04:00
1 parent bfe32257b6
commit 3b550205dd
3 files changed
+59 -7

No files matched your search

+7
View File
@@ -77,6 +77,13 @@ describe('auth command args parsing', () => {
expect(parsed.mode).toBe('shared');
});
it('flags missing shared resource mode value as empty string', () => {
const parsed = parseArgs(['work', '--mode'], { allowMode: true });
expect(parsed.profileName).toBe('work');
expect(parsed.mode).toBe('');
});
it('treats shared resource mode as unknown unless the command opts in', () => {
const parsed = parseArgs(['work', '--mode', 'shared']);