Skip to content

Commit

Permalink
chore(Visibility): fix flaky test (#4415)
Browse files Browse the repository at this point in the history
The main reason was due to a missing `await`. My bad.
It did [fail
here](https://github.com/dnbexperience/eufemia/actions/runs/12377018356/job/34554639319?pr=4414).
  • Loading branch information
tujoworker authored Dec 17, 2024
1 parent 82c6f4d commit 099436d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ describe('Visibility', () => {
<Form.Visibility
pathTrue="/toggleValue"
onAnimationEnd={onAnimationEnd}
animate
animate={false}
>
content
</Form.Visibility>
Expand All @@ -583,8 +583,8 @@ describe('Visibility', () => {

await userEvent.click(checkbox)

expect(() => {
expect(onAnimationEnd).toHaveBeenCalledTimes(0)
await expect(() => {
expect(onAnimationEnd).toHaveBeenCalledTimes(1)
}).toNeverResolve()
})
})
Expand Down

0 comments on commit 099436d

Please sign in to comment.