Skip to content

Commit

Permalink
test: attempt at fixing flackiness (#2952)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Burtey <[email protected]>
  • Loading branch information
nicolasburtey and Nicolas Burtey authored Dec 23, 2023
1 parent 687611b commit d22e681
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions __tests__/screens/send-confirmation.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ it("SendScreen Confirmation", async () => {

// it seems we need multiple act because the component re-render multiple times
// probably this could be debug with why-did-you-render
await act(async () => {})
await act(async () => {})
await act(
() =>
new Promise((resolve) => {
setTimeout(resolve, 10)
}),
)

const { children } = await findByLabelText("Successful Fee")
expect(children).toEqual(["₦0 ($0.00)"])
Expand Down

0 comments on commit d22e681

Please sign in to comment.