From 860d8d5fe7146479a932bbd75d2f2caf262f32f3 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Thu, 7 Feb 2019 14:49:44 +0100 Subject: [PATCH] add usage test --- test/typescript/I18nextProvider.test.tsx | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/typescript/I18nextProvider.test.tsx diff --git a/test/typescript/I18nextProvider.test.tsx b/test/typescript/I18nextProvider.test.tsx new file mode 100644 index 000000000..5249dc913 --- /dev/null +++ b/test/typescript/I18nextProvider.test.tsx @@ -0,0 +1,31 @@ +import i18n from 'i18next'; +import * as React from 'react'; +import { I18nextProvider, initReactI18next } from 'react-i18next'; + +i18n.use(initReactI18next).init({ + fallbackLng: 'en', + + // have a common namespace used around the full app + ns: ['translations'], + defaultNS: 'translations', + + debug: true, + + interpolation: { + escapeValue: false, // not needed for react!! + }, + + react: { + wait: true, + }, +}); + +function test() { + return ( + Loading

}> + +

Foo

+
+
+ ); +}