Skip to content

Commit 6e163ec

Browse files
committed
imp: add the act type and hyperlink
1 parent ce729c7 commit 6e163ec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/react-testing-library/api.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ as these methods:
3131
- [`renderHook` Result](#renderhook-result)
3232
- [`result`](#result)
3333
- [`rerender`](#rerender-1)
34+
- [`unmount`](#unmount-1)
3435

3536
---
3637

@@ -324,6 +325,12 @@ All it does is forward all arguments to the act function if your version of
324325
react supports `act`. It is recommended to use the import from
325326
`@testing-library/react` over `react-dom/test-utils` for consistency reasons.
326327
328+
```typescript
329+
export const act: typeof reactAct extends undefined
330+
? (callback: () => void) => void
331+
: typeof reactAct
332+
```
333+
327334
## `renderHook`
328335
329336
This is a convenience wrapper around `render` with a custom test component. The

0 commit comments

Comments
 (0)