fix gui test
This commit is contained in:
parent
d1f6746d5b
commit
e34c6bc4e7
1 changed files with 7 additions and 4 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { PropsWithChildren } from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import type { RenderOptions } from "@testing-library/react";
|
||||
import { Provider } from "react-redux";
|
||||
import { render } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { PropsWithChildren } from "react";
|
||||
import { Provider } from "react-redux";
|
||||
import { MemoryRouter, RouterProps } from "react-router-dom";
|
||||
import { AuthProvider } from "../../context/Auth";
|
||||
import { setupStore } from "../../redux/store";
|
||||
// As a basic setup, import your same slice reducers
|
||||
|
||||
|
|
@ -29,7 +30,9 @@ export function renderWithProviders(
|
|||
|
||||
const Wrapper = ({ children }: PropsWithChildren) => (
|
||||
<MemoryRouter {...routerProps}>
|
||||
<Provider store={store}>{children}</Provider>
|
||||
<Provider store={store}>
|
||||
<AuthProvider>{children}</AuthProvider>
|
||||
</Provider>
|
||||
</MemoryRouter>
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue