feat(cli): add gemini-auth command and alias support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { createProgram } from './index.js';
|
||||
import { createProgram, normalizeAliasFlags } from './index.js';
|
||||
|
||||
describe('CLI program', () => {
|
||||
it('creates a commander program with expected commands', () => {
|
||||
@@ -22,6 +22,7 @@ describe('CLI program', () => {
|
||||
expect(commandNames).toContain('openai-key');
|
||||
expect(commandNames).toContain('anthropic-auth');
|
||||
expect(commandNames).toContain('zai-auth');
|
||||
expect(commandNames).toContain('gemini-auth');
|
||||
});
|
||||
|
||||
it('registers doctor strict flag on doctor command', () => {
|
||||
@@ -40,4 +41,9 @@ describe('CLI program', () => {
|
||||
const program = createProgram();
|
||||
expect(program.description()).toContain('AI');
|
||||
});
|
||||
|
||||
it('normalizes --gemini-auth alias to gemini-auth command', () => {
|
||||
const argv = normalizeAliasFlags(['node', 'flynn', '--gemini-auth']);
|
||||
expect(argv).toEqual(['node', 'flynn', 'gemini-auth']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user