Skip to content

Commit 2cc80d2

Browse files
committed
wip: Set timeouts for waitFor explicitly
1 parent 47f5157 commit 2cc80d2

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/app/tests.tsx

+16-10
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ test("Homepage", async () => {
1616
"random donation button",
1717
).toBeDefined();
1818

19-
await waitFor(() =>
20-
expect(
21-
screen.getAllByTestId("project-card").at(0),
22-
"project cards loaded",
23-
).toBeDefined(),
19+
await waitFor(
20+
() =>
21+
expect(
22+
screen.getAllByTestId("project-card").at(0),
23+
"project cards loaded",
24+
).toBeDefined(),
25+
26+
{ timeout: 2000 },
2427
);
2528

2629
const projectTitles = screen.getAllByTestId("project-card-title");
@@ -31,10 +34,13 @@ test("Homepage", async () => {
3134
"project-card-fundraising-amount",
3235
);
3336

34-
await waitFor(() =>
35-
expect(
36-
projectFundraisingAmounts.at(0)?.textContent,
37-
"project fundraising amounts",
38-
).toBeDefined(),
37+
await waitFor(
38+
() =>
39+
expect(
40+
projectFundraisingAmounts.at(0)?.textContent,
41+
"project fundraising amounts",
42+
).toBeDefined(),
43+
44+
{ timeout: 2000 },
3945
);
4046
});

0 commit comments

Comments
 (0)