mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
fix(cli): Fix type errors in UI hooks tests (#11483)
This commit is contained in:
@@ -6,7 +6,15 @@
|
||||
|
||||
/** @vitest-environment jsdom */
|
||||
|
||||
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
||||
import {
|
||||
describe,
|
||||
it,
|
||||
expect,
|
||||
beforeEach,
|
||||
vi,
|
||||
afterEach,
|
||||
type Mock,
|
||||
} from 'vitest';
|
||||
import { renderHook, act, waitFor } from '@testing-library/react';
|
||||
import { useCommandCompletion } from './useCommandCompletion.js';
|
||||
import type { CommandContext } from '../commands/types.js';
|
||||
@@ -45,7 +53,7 @@ const setupMocks = ({
|
||||
slashCompletionRange?: { completionStart: number; completionEnd: number };
|
||||
}) => {
|
||||
// Mock for @-completions
|
||||
(useAtCompletion as vi.Mock).mockImplementation(
|
||||
(useAtCompletion as Mock).mockImplementation(
|
||||
({
|
||||
enabled,
|
||||
setSuggestions,
|
||||
@@ -61,7 +69,7 @@ const setupMocks = ({
|
||||
);
|
||||
|
||||
// Mock for /-completions
|
||||
(useSlashCompletion as vi.Mock).mockImplementation(
|
||||
(useSlashCompletion as Mock).mockImplementation(
|
||||
({
|
||||
enabled,
|
||||
setSuggestions,
|
||||
|
||||
Reference in New Issue
Block a user