What
Add unit tests for the Khmer → Braille conversion in packages/core/src/khmerbraille.ts.
Why
The converter has non-trivial rules (pre-base vowel reordering, coeng-រ handling, composite-vowel merging, BRF → Unicode mapping). Tests would lock in correct behavior and make future fixes safe.
Where to start
- Source:
packages/core/src/khmerbraille.ts (exports khmerToBrf, brfToUnicodeBraille, khmerToBraille).
- Add a test file next to it (e.g.
packages/core/src/khmerbraille.test.ts).
- Cover: digits, a few consonants, a pre-base vowel word (e.g.
េ reordering), a coeng cluster, and a composite vowel from the COMBOS list. Round-trip khmerToBraille on a short sentence.
- If no test runner is set up yet in
packages/core, wiring up a lightweight one (e.g. vitest) as part of this issue is welcome — keep it minimal.
Acceptance
- Tests run and pass locally; a few meaningful cases covered.
- No changes to the converter's public API.
Note: some vowel/punctuation cells are still worth a human proofread against the official Khmer Braille chart — tests here are about locking in current behavior, not certifying the chart.
Good for someone comfortable with TypeScript who wants a focused, verifiable task.
What
Add unit tests for the Khmer → Braille conversion in
packages/core/src/khmerbraille.ts.Why
The converter has non-trivial rules (pre-base vowel reordering, coeng-រ handling, composite-vowel merging, BRF → Unicode mapping). Tests would lock in correct behavior and make future fixes safe.
Where to start
packages/core/src/khmerbraille.ts(exportskhmerToBrf,brfToUnicodeBraille,khmerToBraille).packages/core/src/khmerbraille.test.ts).េreordering), a coeng cluster, and a composite vowel from theCOMBOSlist. Round-tripkhmerToBrailleon a short sentence.packages/core, wiring up a lightweight one (e.g.vitest) as part of this issue is welcome — keep it minimal.Acceptance
Note: some vowel/punctuation cells are still worth a human proofread against the official Khmer Braille chart — tests here are about locking in current behavior, not certifying the chart.
Good for someone comfortable with TypeScript who wants a focused, verifiable task.