test(plugins): update file icon test doubles

This commit is contained in:
Neil
2026-07-13 03:33:43 -07:00
parent ca38781c92
commit 0b0bed03f0
2 changed files with 10 additions and 0 deletions
@@ -177,6 +177,12 @@ vi.mock('@/lib/file-type-icons', () => ({
}
}))
vi.mock('@/components/FileTypeIcon', () => ({
FileTypeIcon: function FileTypeIcon(props: Record<string, unknown>) {
return { type: 'FileTypeIcon', props }
}
}))
vi.mock('@/store/selectors', () => ({
useRepoById: () => ({ connectionId: null }),
useWorktreeById: () => ({ path: '/repo', repoId: 'repo-1' })
@@ -125,6 +125,10 @@ vi.mock('@/lib/file-type-icons', () => ({
}
}))
vi.mock('@/components/FileTypeIcon', () => ({
FileTypeIcon: () => <span data-file-icon />
}))
vi.mock('@/lib/rename-file', () => ({
renameFileOnDisk: vi.fn()
}))