refactor: use ungh for github api (#34108)

This commit is contained in:
Stephen Zhou
2026-03-26 14:37:17 +08:00
committed by GitHub
parent 554ba6b8f3
commit c32eebf57d
26 changed files with 236 additions and 428 deletions

View File

@ -103,12 +103,14 @@ vi.mock('@/service/use-tools', () => ({
useInvalidateAllToolProviders: () => mockInvalidateAllToolProviders,
}))
vi.mock('../../install-plugin/hooks', () => ({
useGitHubReleases: () => ({
vi.mock('../../install-plugin/hooks', async (importOriginal) => {
const actual = await importOriginal<typeof import('../../install-plugin/hooks')>()
return {
...actual,
checkForUpdates: mockCheckForUpdates,
fetchReleases: mockFetchReleases,
}),
}))
}
})
// Auto upgrade settings mock
let mockAutoUpgradeInfo: {