diff options
| author | N. Taylor Mullen <[email protected]> | 2025-07-12 15:42:47 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-12 15:42:47 -0700 |
| commit | 4442e893c367a901a4c801816e0ade5b78c291c9 (patch) | |
| tree | a5962bb7e5995e33306bd33635f25f889f5c4b52 /packages/core/src/code_assist/oauth2.test.ts | |
| parent | 890982a811e22de9525148e6c28f39bfbf10a49a (diff) | |
fix(auth): Remove sharp edges from headless auth (#3985)
Diffstat (limited to 'packages/core/src/code_assist/oauth2.test.ts')
| -rw-r--r-- | packages/core/src/code_assist/oauth2.test.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/core/src/code_assist/oauth2.test.ts b/packages/core/src/code_assist/oauth2.test.ts index a7dc3ab8..4661f49a 100644 --- a/packages/core/src/code_assist/oauth2.test.ts +++ b/packages/core/src/code_assist/oauth2.test.ts @@ -212,9 +212,7 @@ describe('oauth2', () => { }; (readline.createInterface as Mock).mockReturnValue(mockReadline); - const consoleErrorSpy = vi - .spyOn(console, 'error') - .mockImplementation(() => {}); + const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); const client = await getOauthClient( AuthType.LOGIN_WITH_GOOGLE, @@ -226,7 +224,7 @@ describe('oauth2', () => { // Verify the auth flow expect(mockGenerateCodeVerifierAsync).toHaveBeenCalled(); expect(mockGenerateAuthUrl).toHaveBeenCalled(); - expect(consoleErrorSpy).toHaveBeenCalledWith( + expect(consoleLogSpy).toHaveBeenCalledWith( expect.stringContaining(mockAuthUrl), ); expect(mockReadline.question).toHaveBeenCalledWith( @@ -240,7 +238,7 @@ describe('oauth2', () => { }); expect(mockSetCredentials).toHaveBeenCalledWith(mockTokens); - consoleErrorSpy.mockRestore(); + consoleLogSpy.mockRestore(); }); describe('in Cloud Shell', () => { |
