We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f824a7 commit 6a9f7bbCopy full SHA for 6a9f7bb
tests/App.test.tsx
@@ -1,8 +1,28 @@
1
import { render } from 'vitest-browser-react';
2
import App from '../src/App.tsx';
3
-import { /*expect,*/ test } from "vitest";
+import { beforeAll, /*expect,*/ test } from "vitest";
4
+import i18n from 'i18next';
5
+import { I18nextProvider, initReactI18next } from 'react-i18next';
6
+
7
+beforeAll(() => {
8
+ // Initialize i18next with a basic configuration for testing
9
+ i18n
10
+ .use(initReactI18next)
11
+ .init({
12
+ lng: 'en',
13
+ fallbackLng: 'en',
14
+ resources: {
15
+ en: {
16
+ translation: {}
17
+ }
18
19
+ });
20
+});
21
22
test('renders app', async () => {
- render(<App />);
23
+ render(
24
+ <I18nextProvider i18n={i18n}>
25
+ <App />
26
+ </I18nextProvider>);
27
// TODO: Add some expect statements.
28
});
0 commit comments