Skip to content

Commit ec3d62b

Browse files
committed
fix(cli): use MockInstance for type safety in tests
1 parent 9301b44 commit ec3d62b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

packages/cli/src/commands/skills/list.test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
7+
import {
8+
vi,
9+
describe,
10+
it,
11+
expect,
12+
beforeEach,
13+
afterEach,
14+
type MockInstance,
15+
} from 'vitest';
816
import { type Config } from '@google/gemini-cli-core';
917
import { handleList, listCommand } from './list.js';
1018
import { loadSettings, type LoadedSettings } from '../../config/settings.js';
@@ -32,8 +40,7 @@ vi.mock('../utils.js', () => ({
3240
describe('skills list command', () => {
3341
const mockLoadSettings = vi.mocked(loadSettings);
3442
const mockLoadCliConfig = vi.mocked(loadCliConfig);
35-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
36-
let stdoutWriteSpy: any;
43+
let stdoutWriteSpy: MockInstance<typeof process.stdout.write>;
3744

3845
beforeEach(async () => {
3946
vi.clearAllMocks();

0 commit comments

Comments
 (0)