52 tests cover the text-rules contract end to end: - cjk-detect primitive: 6 scripts (zh/ja/ko/ar/emoji/latin) × correct mapping to 'chinese' | 'japanese' | 'korean' | null - cjkFontFamily: maps each script to Noto Sans SC/JP/KR, null → undefined - heading: 4 levels × 6 scripts = 24 tests verifying zh→Noto Sans SC, ja→Noto Sans JP, ko→Noto Sans KR, else undefined - heading CJK preset: lineHeight >= 1.3 + non-negative letterSpacing (regression guard — CJK chars overlap with negative tracking) - body-text: 6 scripts all resolve to Inter (fallback font stack handles CJK, not explicit dispatch) - Baseline: 10 other text-carrying builders with CJK content emit sub-text nodes WITHOUT fontFamily — this anchors current behavior so a future regression that leaks dispatch becomes visible. The baseline tests are deliberate: they document "what doesn't dispatch today" rather than asserting it's wrong. If we ever want list-row or card-row to auto-pick CJK fonts, the test will need to be updated as part of that decision. |
||
|---|---|---|
| .. | ||
| agent-native@e1f90cab96 | ||
| pen-acp | ||
| pen-ai-skills | ||
| pen-core | ||
| pen-engine | ||
| pen-figma | ||
| pen-mcp | ||
| pen-react | ||
| pen-renderer | ||
| pen-sdk | ||
| pen-types | ||
| CLAUDE.md | ||