diff --git a/packages/cli/src/config/auth.test.ts b/packages/cli/src/config/auth.test.ts index fb951f8aa4..8d565dca13 100644 --- a/packages/cli/src/config/auth.test.ts +++ b/packages/cli/src/config/auth.test.ts @@ -39,7 +39,7 @@ describe('validateAuthMethod', () => { }); it('should return an error message if GEMINI_API_KEY is not set', () => { - vi.stubEnv('GEMINI_API_KEY', ''); + vi.stubEnv('GEMINI_API_KEY', undefined); expect(validateAuthMethod(AuthType.USE_GEMINI)).toBe( 'GEMINI_API_KEY environment variable not found. Add that to your environment and try again (no reload needed if using .env)!', ); @@ -59,6 +59,8 @@ describe('validateAuthMethod', () => { }); it('should return an error message if no required environment variables are set', () => { + vi.stubEnv('GOOGLE_CLOUD_PROJECT', undefined); + vi.stubEnv('GOOGLE_CLOUD_LOCATION', undefined); expect(validateAuthMethod(AuthType.USE_VERTEX_AI)).toBe( 'When using Vertex AI, you must specify either:\n' + '• GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION environment variables.\n' +