Skip to content

Commit

Permalink
fix: test warnings (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
patricio0312rev authored Nov 2, 2023
1 parent 4a22f37 commit b7ec619
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions resources/js/Components/Report.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import NftFactory from "@/Tests/Factories/Nfts/NftFactory";
import UserDataFactory from "@/Tests/Factories/UserDataFactory";
import WalletFactory from "@/Tests/Factories/Wallet/WalletFactory";
import { getSampleMetaMaskState } from "@/Tests/SampleData/SampleMetaMaskState";
import { mockAuthContext, render, screen, userEvent } from "@/Tests/testing-library";
import { act, mockAuthContext, render, screen, userEvent } from "@/Tests/testing-library";

let routerSpy: SpyInstance;
let useAuthorizedActionSpy: SpyInstance;
Expand Down Expand Up @@ -129,15 +129,17 @@ describe("Report", () => {
expect(screen.queryByTestId("ReportModal")).not.toBeInTheDocument();
});

it("show report modal on load", () => {
it("show report modal on load", async () => {
const collection = new CollectionDetailDataFactory().create();

render(
<Report
model={collection}
modelType={"collection"}
show={true}
/>,
await act(() =>
render(
<Report
model={collection}
modelType={"collection"}
show={true}
/>,
),
);

expect(screen.getByTestId("ReportModal")).toBeInTheDocument();
Expand Down

0 comments on commit b7ec619

Please sign in to comment.