Skip to content

Commit

Permalink
Fix infinite suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Silbermann committed Jan 27, 2024
1 parent 0a97b1c commit eceadd9
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,10 @@ describe.each(table)(`useFocus`, hasPointerEvents => {
);
expect(onBeforeBlurWithin).toHaveBeenCalledTimes(1);
expect(onAfterBlurWithin).toHaveBeenCalledTimes(1);
resolve();
await act(() => {
suspend = false;
resolve();
});
});

// @gate www
Expand Down Expand Up @@ -612,7 +615,10 @@ describe.each(table)(`useFocus`, hasPointerEvents => {
expect(onBeforeBlurWithin).toHaveBeenCalledTimes(1);
expect(onAfterBlurWithin).toHaveBeenCalledTimes(1);

resolve();
await act(() => {
suspend = false;
resolve();
});
});
});
});

0 comments on commit eceadd9

Please sign in to comment.