diff options
| author | Brandon Keiji <[email protected]> | 2025-06-18 09:57:17 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-18 16:57:17 +0000 |
| commit | 30d1662128e688bf94653a0144ef96c311fae40b (patch) | |
| tree | 439f4f7febd2a37af11c8ea6b6c21865f0a0052f /packages/cli/src/ui/hooks/slashCommandProcessor.test.ts | |
| parent | 3453b977b8d200ebb5195cc2db38d89dbc2a7323 (diff) | |
fix: check package.json for app version (#1160) (#1182)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.test.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.test.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts index 2eec29ca..7c750af1 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts @@ -48,7 +48,7 @@ vi.mock('node:fs/promises', () => ({ mkdir: vi.fn(), })); -const mockGetCliVersionFn = vi.fn(() => '0.1.0'); +const mockGetCliVersionFn = vi.fn(() => Promise.resolve('0.1.0')); vi.mock('../../utils/version.js', () => ({ getCliVersion: (...args: []) => mockGetCliVersionFn(...args), })); @@ -377,7 +377,7 @@ describe('useSlashCommandProcessor', () => { const originalEnv = process.env; beforeEach(() => { vi.resetModules(); - mockGetCliVersionFn.mockReturnValue('0.1.0'); + mockGetCliVersionFn.mockResolvedValue('0.1.0'); process.env = { ...originalEnv }; }); @@ -427,7 +427,7 @@ Add any other context about the problem here. }; it('should call open with the correct GitHub issue URL and return true', async () => { - mockGetCliVersionFn.mockReturnValue('test-version'); + mockGetCliVersionFn.mockResolvedValue('test-version'); process.env.SANDBOX = 'gemini-sandbox'; process.env.SEATBELT_PROFILE = 'test_profile'; const { handleSlashCommand } = getProcessor(); |
