fix(auth): update terminology to 'sign in' and 'sign out' (#20892)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Mark McLaughlin
2026-03-10 12:10:26 -07:00
committed by GitHub
parent b00d7c88ad
commit b404fc02e7
35 changed files with 95 additions and 78 deletions
@@ -34,11 +34,13 @@ describe('authCommand', () => {
vi.clearAllMocks();
});
it('should have subcommands: login and logout', () => {
it('should have subcommands: signin and signout', () => {
expect(authCommand.subCommands).toBeDefined();
expect(authCommand.subCommands).toHaveLength(2);
expect(authCommand.subCommands?.[0]?.name).toBe('login');
expect(authCommand.subCommands?.[1]?.name).toBe('logout');
expect(authCommand.subCommands?.[0]?.name).toBe('signin');
expect(authCommand.subCommands?.[0]?.altNames).toContain('login');
expect(authCommand.subCommands?.[1]?.name).toBe('signout');
expect(authCommand.subCommands?.[1]?.altNames).toContain('logout');
});
it('should return a dialog action to open the auth dialog when called with no args', () => {
@@ -59,19 +61,19 @@ describe('authCommand', () => {
expect(authCommand.description).toBe('Manage authentication');
});
describe('auth login subcommand', () => {
describe('auth signin subcommand', () => {
it('should return auth dialog action', () => {
const loginCommand = authCommand.subCommands?.[0];
expect(loginCommand?.name).toBe('login');
expect(loginCommand?.name).toBe('signin');
const result = loginCommand!.action!(mockContext, '');
expect(result).toEqual({ type: 'dialog', dialog: 'auth' });
});
});
describe('auth logout subcommand', () => {
describe('auth signout subcommand', () => {
it('should clear cached credentials', async () => {
const logoutCommand = authCommand.subCommands?.[1];
expect(logoutCommand?.name).toBe('logout');
expect(logoutCommand?.name).toBe('signout');
const { clearCachedCredentialFile } = await import(
'@google/gemini-cli-core'