diff options
| author | Richie Foreman <[email protected]> | 2025-08-17 12:43:21 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-17 16:43:21 +0000 |
| commit | 2998f27f703282359f6389d1c2d8758fc6a14955 (patch) | |
| tree | a7e3ff7f969c44e61ab27240cdd615e291b6deae /packages/cli/src/ui/components/AuthDialog.test.tsx | |
| parent | ec1fa954d18ec9abab3ce669536dd24559a499f1 (diff) | |
chore(compiler): Enable strict property access TS compiler flag. (#6255)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/AuthDialog.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/AuthDialog.test.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/cli/src/ui/components/AuthDialog.test.tsx b/packages/cli/src/ui/components/AuthDialog.test.tsx index 3efc3c01..38c6972a 100644 --- a/packages/cli/src/ui/components/AuthDialog.test.tsx +++ b/packages/cli/src/ui/components/AuthDialog.test.tsx @@ -17,8 +17,8 @@ describe('AuthDialog', () => { beforeEach(() => { originalEnv = { ...process.env }; - process.env.GEMINI_API_KEY = ''; - process.env.GEMINI_DEFAULT_AUTH_TYPE = ''; + process.env['GEMINI_API_KEY'] = ''; + process.env['GEMINI_DEFAULT_AUTH_TYPE'] = ''; vi.clearAllMocks(); }); @@ -27,7 +27,7 @@ describe('AuthDialog', () => { }); it('should show an error if the initial auth type is invalid', () => { - process.env.GEMINI_API_KEY = ''; + process.env['GEMINI_API_KEY'] = ''; const settings: LoadedSettings = new LoadedSettings( { @@ -62,7 +62,7 @@ describe('AuthDialog', () => { describe('GEMINI_API_KEY environment variable', () => { it('should detect GEMINI_API_KEY environment variable', () => { - process.env.GEMINI_API_KEY = 'foobar'; + process.env['GEMINI_API_KEY'] = 'foobar'; const settings: LoadedSettings = new LoadedSettings( { @@ -94,8 +94,8 @@ describe('AuthDialog', () => { }); it('should not show the GEMINI_API_KEY message if GEMINI_DEFAULT_AUTH_TYPE is set to something else', () => { - process.env.GEMINI_API_KEY = 'foobar'; - process.env.GEMINI_DEFAULT_AUTH_TYPE = AuthType.LOGIN_WITH_GOOGLE; + process.env['GEMINI_API_KEY'] = 'foobar'; + process.env['GEMINI_DEFAULT_AUTH_TYPE'] = AuthType.LOGIN_WITH_GOOGLE; const settings: LoadedSettings = new LoadedSettings( { @@ -127,8 +127,8 @@ describe('AuthDialog', () => { }); it('should show the GEMINI_API_KEY message if GEMINI_DEFAULT_AUTH_TYPE is set to use api key', () => { - process.env.GEMINI_API_KEY = 'foobar'; - process.env.GEMINI_DEFAULT_AUTH_TYPE = AuthType.USE_GEMINI; + process.env['GEMINI_API_KEY'] = 'foobar'; + process.env['GEMINI_DEFAULT_AUTH_TYPE'] = AuthType.USE_GEMINI; const settings: LoadedSettings = new LoadedSettings( { @@ -162,7 +162,7 @@ describe('AuthDialog', () => { describe('GEMINI_DEFAULT_AUTH_TYPE environment variable', () => { it('should select the auth type specified by GEMINI_DEFAULT_AUTH_TYPE', () => { - process.env.GEMINI_DEFAULT_AUTH_TYPE = AuthType.LOGIN_WITH_GOOGLE; + process.env['GEMINI_DEFAULT_AUTH_TYPE'] = AuthType.LOGIN_WITH_GOOGLE; const settings: LoadedSettings = new LoadedSettings( { @@ -222,7 +222,7 @@ describe('AuthDialog', () => { }); it('should show an error and fall back to default if GEMINI_DEFAULT_AUTH_TYPE is invalid', () => { - process.env.GEMINI_DEFAULT_AUTH_TYPE = 'invalid-auth-type'; + process.env['GEMINI_DEFAULT_AUTH_TYPE'] = 'invalid-auth-type'; const settings: LoadedSettings = new LoadedSettings( { |
