mirror of
https://github.com/Smile-QWQ/SubTracker.git
synced 2026-10-15 12:01:43 +08:00
## 中文 - 为 web 单测补上统一的测试语言初始化,避免每个用例重复手动设置 locale。 - 修复 lite Worker 中匿名读取 /api/v1/app/locale 会被鉴权拦截的问题,使新会话也能读取已持久化的语言设置。 - 同步补齐相关 API / Web 测试断言,并将换汇缺失汇率时的错误提示接入 i18n。 ## English - Add shared locale initialization for web tests so each case no longer has to set the locale manually. - Fix the lite Worker auth guard so anonymous GET /api/v1/app/locale can read the persisted locale in fresh sessions. - Update the related API and web assertions and localize the missing-rate currency conversion error.
7 lines
124 B
TypeScript
7 lines
124 B
TypeScript
import { beforeEach } from 'vitest'
|
|
import { setAppLocale } from '@/locales'
|
|
|
|
beforeEach(() => {
|
|
setAppLocale('zh-CN')
|
|
})
|