I18N-009 recommended Testing
Test with different locales
Tests should validate behavior across locales, not just the default language. At minimum, smoke tests for non-default locales.
Question to ask
"Your tests pass in en-US — what about fr-FR?"
Verification guide
Severity: Recommended
Tests should validate behavior across locales, not just the default language.
Check automatically:
# Check for locale in test setup/config
grep -riE "locale|i18n|language" jest.config* vitest.config* cypress.config* playwright.config* 2>/dev/null
# Look for locale-specific test files or describe blocks
grep -riE "locale|i18n|language.*test|test.*translation" --include="*.test.*" --include="*.spec.*" . 2>/dev/null | grep -v node_modules | head -10
# Check for test utilities that set locale
grep -riE "setLocale|changeLanguage|IntlProvider|I18nextProvider" --include="*.test.*" --include="*.spec.*" . 2>/dev/null | grep -v node_modules | head -10
# Look for E2E tests with locale switching
grep -riE "locale|language" cypress/ e2e/ tests/ --include="*.ts" --include="*.js" 2>/dev/null | grep -v node_modules | head -10
Ask user:
- "Are tests run against multiple locales?"
- "Is there a smoke test for each supported language?"
- "How are locale-specific bugs caught before release?"
Pass criteria:
- Unit/integration tests can run with different locales
- At least smoke tests exist for non-default locales
- CI runs tests against multiple locales OR manual locale testing before release
Fail criteria:
- Tests only run in default locale (usually English)
- "We test manually" but no documented process
- Locale bugs found only by users
Evidence to capture:
- Locale testing approach
- Locales tested in CI
- Manual testing process (if any)