Fix incompatibilities with package.json (#8949)

This commit is contained in:
Tommaso Sciortino
2025-09-20 11:38:03 -07:00
committed by GitHub
parent 375b8522fc
commit 62b49ab14a
7 changed files with 112 additions and 29 deletions

View File

@@ -10,8 +10,6 @@ import { act } from 'react';
import { renderHook, waitFor } from '@testing-library/react';
import { useGitBranchName } from './useGitBranchName.js';
import { fs, vol } from 'memfs'; // For mocking fs
import type { FSWatcher } from 'memfs/lib/volume.js';
import { spawnAsync as mockSpawnAsync } from '@google/gemini-cli-core';
// Mock @google/gemini-cli-core
@@ -207,7 +205,7 @@ describe('useGitBranchName', () => {
const closeMock = vi.fn();
const watchMock = vi.spyOn(fs, 'watch').mockReturnValue({
close: closeMock,
} as unknown as FSWatcher);
} as unknown as ReturnType<typeof fs.watch>);
(mockSpawnAsync as MockedFunction<typeof mockSpawnAsync>).mockResolvedValue(
{