Skip to content

Commit e87b6c8

Browse files
author
Kent C. Dodds
committed
add docs for act
1 parent 34c21e4 commit e87b6c8

File tree

1 file changed

+5
-5
lines changed
  • docs/react-testing-library

1 file changed

+5
-5
lines changed

docs/react-testing-library/api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ that you configure your test framework to run a file before your tests which
248248
does this automatically. See the [setup](./setup) section for guidance on how to
249249
set up your framework.
250250
251-
## `flushEffects`
251+
## `act`
252252
253-
**Experimental**
254-
255-
This experimental API is intended to be used to force React's `useEffect` hook
256-
to run synchronously.
253+
This is a light wrapper around the
254+
[`react-dom/test-utils` `act` function](https://reactjs.org/docs/test-utils.html#act).
255+
All it does is forward all arguments to the act function if your version of
256+
react supports `act`.

0 commit comments

Comments
 (0)