Skip to content

Commit

Permalink
test: add missing act()
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Jul 26, 2024
1 parent 8e258c6 commit fd5b8c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ describe("App", () => {
it("shows new budget when clicking new button", async () => {
render(comp);
const newButton = screen.getAllByRole("button", { name: "new budget" });
await userEvent.click(newButton[0]);
await act(async () => {
await userEvent.click(newButton[0]);
});
expect(screen.getByLabelText("delete budget")).toBeInTheDocument();
expect(screen.getByLabelText("clone budget")).toBeInTheDocument();
expect(await screen.findByText("Statistics")).toBeInTheDocument();
Expand Down

0 comments on commit fd5b8c6

Please sign in to comment.