mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-14 09:01:16 +00:00
test(i18n): preserve initialization in suite badge mocks
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
754c2ef0b8
commit
8f64d9b5e6
1 changed files with 2 additions and 1 deletions
|
|
@ -7,7 +7,8 @@ import { SkillCard } from './skill-card'
|
|||
vi.mock('@/api/client', () => ({ buildApiUrl: (url: string) => url }))
|
||||
vi.mock('@/features/auth/use-auth', () => ({ useAuth: () => ({ isAuthenticated: false }) }))
|
||||
vi.mock('@/features/social/use-star', () => ({ useStarredIdSet: () => ({ starredIds: new Set<number>() }) }))
|
||||
vi.mock('react-i18next', () => ({
|
||||
vi.mock('react-i18next', async (importOriginal) => ({
|
||||
...await importOriginal<typeof import('react-i18next')>(),
|
||||
useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }),
|
||||
}))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue