test: add a data-integrity test for every built-in locale
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- testing
调研方向
阅读 src/locales/index.ts 和 src/locales/types.ts,了解内置 locale 的结构和 pool 数组,然后查看现有测试的惯例。添加 tests/locales/data-integrity.test.ts,针对每个 locale 检查指定字段、去除首尾空白后非空的字符串以及重复项;运行相关测试命令。完成标准:每个内置 locale 都有覆盖,且失败信息能指出对应的 locale。
由索引模型根据 Issue 内容生成。
描述
Locale data (src/locales/*.ts) is only checked indirectly (registry tests + a few module tests). Nothing guarantees that every built-in locale has every pool populated, so a new or edited locale could ship an empty array (making generators return undefined) or accidental duplicates without failing CI.
What to do
Add tests/locales/data-integrity.test.ts that iterates over builtInLocales (exported from src/locales/index.ts) and asserts, for each locale:
codematches its key inbuiltInLocalesandnameis non-empty- every array in
person,location,companyandlorem(seesrc/locales/types.ts) is non-empty and contains only non-empty, trimmed strings - no duplicate entries within a pool (or document why duplicates are intentional)
Use describe.each / it.each so failures name the locale. This also makes future locale PRs (e.g. #12) self-validating.
PR title: test(locale): add data-integrity checks for built-in locales.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SahinurDEV/ForgeData 的其他 Issue
-
documentation good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 75/100
SahinurDEV/ForgeData#17 ·
-
enhancement good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 78/100
SahinurDEV/ForgeData#16 ·
-
enhancement good first issue hacktoberfest help wanted
难度 3/5 1-2 天 新手友好度 78/100
SahinurDEV/ForgeData#12 ·
查看 SahinurDEV/ForgeData 的全部 Issue
相似的 Issue
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
难度 2/5 1-3 小时 新手友好度 82/100
openclaw/openclaw#212827 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Use one constant for the 10,000-character input limit可能已有人在做 @NginxL 今天认领。 未关闭good first issue refactor
难度 2/5 1-3 小时 新手友好度 78/100
aniru-dh21/snap-validate#51 ·
维护者通常 1 天内回复
-
dependencies effort: small good first issue priority: low
难度 1/5 1-3 小时 新手友好度 88/100
TMHSDigital/screencast-mcp#509 ·
维护者通常 1 天内回复
-
from-review tech-debt testing
难度 2/5 1-3 小时 新手友好度 82/100
blamechris/chroxy#9520 ·
维护者通常 1 天内回复