From 11f80251148c3b482d8adc54bb974f867d4a8a3b Mon Sep 17 00:00:00 2001 From: mkorwel Date: Mon, 16 Mar 2026 08:47:14 -0700 Subject: [PATCH] fix(test): restore missing fs import in teleportCommand tests --- packages/cli/src/ui/commands/teleportCommand.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/ui/commands/teleportCommand.test.ts b/packages/cli/src/ui/commands/teleportCommand.test.ts index 7c854cba25..ec0d50bc37 100644 --- a/packages/cli/src/ui/commands/teleportCommand.test.ts +++ b/packages/cli/src/ui/commands/teleportCommand.test.ts @@ -10,6 +10,7 @@ import { type CommandContext } from './types.js'; import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; import { type Config } from '@google/gemini-cli-core'; import { existsSync } from 'node:fs'; +import * as fs from 'node:fs'; const mockExportSession = vi.fn(); const mockImportSession = vi.fn(); @@ -131,13 +132,15 @@ describe('teleportCommand', () => { (c) => c.name === 'export', ); vi.mocked(existsSync).mockReturnValue(true); + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion + vi.mocked(fs.readFileSync as any).mockReturnValue('file-secret'); await exportSubCommand?.action?.(mockContext, '--key-file /path/to/key'); expect(mockExportSession).toHaveBeenCalledWith( 'current-session-id', expect.any(String), - expect.any(String), + 'file-secret', undefined, ); });