From e0a79ca5c686de32ba5064dd90d8700f17392d1c Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:07:00 +0200 Subject: [PATCH] test: keep the locale tests independent of which overlay keys are translated --- src/i18n/__tests__/locale.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/i18n/__tests__/locale.test.ts b/src/i18n/__tests__/locale.test.ts index 5afd5b7f..7c4e7bde 100644 --- a/src/i18n/__tests__/locale.test.ts +++ b/src/i18n/__tests__/locale.test.ts @@ -53,8 +53,10 @@ describe('translate', () => { expect(many).toBe('3 emails selected'); }); - it('serves RN-only overlay keys in every locale via the en fallback', () => { - expect(translate('fr', 'email_list.no_trash_folder')).toContain('Trash'); + it('serves RN-only overlay keys in every locale', () => { + const french = translate('fr', 'email_list.no_trash_folder'); + expect(french).not.toBe('email_list.no_trash_folder'); + expect(french).not.toBe(''); }); }); @@ -68,7 +70,7 @@ describe('catalog loading', () => { expect(i18n.loadedLocales().sort()).toEqual(['de']); // A key German lacks falls through to English, which is built then. - i18n.translate('de', 'email_list.no_trash_folder'); + i18n.translate('de', 'nope.missing'); expect(i18n.loadedLocales().sort()).toEqual(['de', 'en']); // Switching language loads the new catalog synchronously.