Download projects/gemini-cli/packages/cli/src/ui/commands/editorCommand.test.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 918 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/editorCommand.test.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/editorCommand.test.ts
-
curl -L -o editorCommand.test.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/editorCommand.test.ts
918 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { describe, it, expect } from 'vitest'; | |
| import { editorCommand } from './editorCommand.js'; | |
| // 1. Import the mock context utility | |
| import { createMockCommandContext } from '../../test-utils/mockCommandContext.js'; | |
| describe('editorCommand', () => { | |
| it('should return a dialog action to open the editor dialog', () => { | |
| if (!editorCommand.action) { | |
| throw new Error('The editor command must have an action.'); | |
| } | |
| const mockContext = createMockCommandContext(); | |
| const result = editorCommand.action(mockContext, ''); | |
| expect(result).toEqual({ | |
| type: 'dialog', | |
| dialog: 'editor', | |
| }); | |
| }); | |
| it('should have the correct name and description', () => { | |
| expect(editorCommand.name).toBe('editor'); | |
| expect(editorCommand.description).toBe('set external editor preference'); | |
| }); | |
| }); | |