Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(i18n): the plural test loads its locale itself instead of queueing behind every other

Mauricee9f7d5e77b0e
diff --git a/client/tests/unit/i18n/TranslationContext.test.tsx b/client/tests/unit/i18n/TranslationContext.test.tsx
index 1bd7c9249..ea29af85b 100644
--- a/client/tests/unit/i18n/TranslationContext.test.tsx
+++ b/client/tests/unit/i18n/TranslationContext.test.tsx
@@ -147,6 +147,11 @@ describe('TranslationProvider', () => {
});
it('FE-COMP-I18NCTX-018: plural forms follow the language of the strings on screen, not the one still loading', async () => {
+ // The chunk is loaded here first: FE-COMP-I18NCTX-011a starts every locale at
+ // once without waiting, and the Russian one could otherwise queue behind the
+ // others past any timeout. The provider still switches asynchronously, so the
+ // first render below is English all the same.
+ await import('@trek/shared/i18n/ru');
withLanguage('ru');
render(<TranslationProvider><Probe tKey="places.count" params={{ count: 21 }} /></TranslationProvider>);