Skip to content

Commit

Permalink
test(ui): ensure App component correctly renders within Redux and…
Browse files Browse the repository at this point in the history
… `MUI` providers
  • Loading branch information
hdinia committed Jun 24, 2024
1 parent 68238fe commit c96f574
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions webapp/src/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { describe, expect } from "vitest";
import { render } from "@testing-library/react";
import { Provider } from "react-redux";
import { StyledEngineProvider } from "@mui/material";
import App from "./components/App";
import store from "./redux/store";

describe("Application Render", () => {
test("renders the App component with providers", () => {
const { getByText } = render(
<StyledEngineProvider injectFirst>
<Provider store={store}>
<App />
</Provider>
</StyledEngineProvider>,
);

expect(getByText("Antares Web")).toBeInTheDocument();
});
});

0 comments on commit c96f574

Please sign in to comment.