You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: add a data-integrity test for every built-in locale #15
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:
code matches its key in builtInLocales and name is non-empty
every array in person, location, company and lorem (see src/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.
Activity