Dev.to
5/10/2026

The Cypress i18n Mistake: Testing Words Instead of Meaning - i18next is your partner
Short summary
Testing multilingual Cypress apps by hardcoding translated text creates brittle tests that fail when copy changes. Instead, use i18next to test meaning—e.g., cy.t('auth.welcome', {lng: 'es'})—rather than specific words. This pattern keeps tests stable as translations evolve while maintaining coverage across languages.
- •Hardcoding translations in Cypress tests breaks when copy changes, conflating test failures with app failures
- •Use i18next to decouple tests from translation text by resolving keys at test time
- •Test user behavior and meaning, not specific translated strings
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


