File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
website/docs/13.x/docs/api/events Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -176,13 +176,11 @@ The `fireEventAsync` function is the async version of `fireEvent` designed for w
176176``` jsx
177177import { renderAsync , screen , fireEventAsync } from ' @testing-library/react-native' ;
178178
179- test (' async fire event test' , async () => {
180- await renderAsync (< MyAsyncComponent / > );
179+ test (' fire event test' , async () => {
180+ await renderAsync (< MySuspenseComponent / > );
181181
182- // Use fireEventAsync when event handlers have async behavior
183- await fireEventAsync (screen .getByText (' Async Button' ), ' press' );
184-
185- expect (screen .getByText (' Async operation completed' )).toBeOnTheScreen ();
182+ await fireEventAsync (screen .getByText (' Button' ), ' press' );
183+ expect (screen .getByText (' Action completed' )).toBeOnTheScreen ();
186184});
187185```
188186
You can’t perform that action at this time.
0 commit comments