From d19665d7c991795aece1476bc7cad27d6be43b53 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Mon, 13 Mar 2023 14:09:45 +0100 Subject: [PATCH] chore: better comment --- packages/react/src/I18nProvider.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/I18nProvider.test.tsx b/packages/react/src/I18nProvider.test.tsx index e26f8f51e..17e142345 100644 --- a/packages/react/src/I18nProvider.test.tsx +++ b/packages/react/src/I18nProvider.test.tsx @@ -173,13 +173,13 @@ describe("I18nProvider", () => { renderCount++ return {i18n.locale} } + /** * Note that we're doing exactly what the description says: * but to simulate the equivalent situation, we pass our own mock subscriber - * to i18n.on("change", ...) and then we call i18n.activate("cs") ourselves + * to i18n.on("change", ...) and in it we call i18n.activate("cs") ourselves * so that the condition in useEffect() is met and the component re-renders * */ - const mockSubscriber = jest.fn(() => { i18n.load("cs", {}) i18n.activate("cs")