fix: tests

This commit is contained in:
yyh
2026-03-11 20:42:40 +08:00
parent 715a0fabfc
commit c08b9a289b
2 changed files with 14 additions and 4 deletions

View File

@ -170,9 +170,13 @@ vi.mock('@/service/use-plugins', () => ({
}))
// Mock config
vi.mock('@/config', () => ({
MARKETPLACE_API_PREFIX: 'https://marketplace.example.com',
}))
vi.mock('@/config', async () => {
const actual = await vi.importActual<typeof import('@/config')>('@/config')
return {
...actual,
MARKETPLACE_API_PREFIX: 'https://marketplace.example.com',
}
})
// Mock mitt context
vi.mock('@/context/mitt-context', () => ({