Skip to content

Commit

Permalink
fix(ui): fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vu Van Duc authored and Vu Van Duc committed Jul 15, 2024
1 parent 10aab3a commit 3b0a60e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/ui/pages/Notifications/Notifications.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createMemoryHistory } from "history";
import { act } from "react-dom/test-utils";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import { MemoryRouter } from "react-router-dom";
import EN_TRANSLATIONS from "../../../locales/en/en.json";
import { TabsRoutePath } from "../../../routes/paths";
import { connectionsForNotifications } from "../../__fixtures__/connectionsFix";
Expand Down Expand Up @@ -96,7 +97,9 @@ describe("Notifications Tab", () => {
};
const { getByTestId, getByText, queryByTestId } = render(
<Provider store={storeMocked}>
<Notifications />
<MemoryRouter initialEntries={[TabsRoutePath.NOTIFICATIONS]}>
<Notifications />
</MemoryRouter>
</Provider>
);

Expand Down Expand Up @@ -124,7 +127,9 @@ describe("Notifications Tab", () => {
};
const { getByTestId, queryByTestId } = render(
<Provider store={storeMocked}>
<Notifications />
<MemoryRouter initialEntries={[TabsRoutePath.NOTIFICATIONS]}>
<Notifications />
</MemoryRouter>
</Provider>
);

Expand Down Expand Up @@ -210,7 +215,9 @@ describe("Notifications Tab", () => {
};
const { getByTestId, getByText, getAllByText } = render(
<Provider store={storeMocked}>
<Notifications />
<MemoryRouter initialEntries={[TabsRoutePath.NOTIFICATIONS]}>
<Notifications />
</MemoryRouter>
</Provider>
);

Expand Down

0 comments on commit 3b0a60e

Please sign in to comment.