From 6e163ecf375712e8e0861013d979b21490ddca03 Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Wed, 25 Oct 2023 19:23:34 +0900 Subject: [PATCH 1/2] imp: add the act type and hyperlink --- docs/react-testing-library/api.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index 9d95cd584..a699e574c 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -31,6 +31,7 @@ as these methods: - [`renderHook` Result](#renderhook-result) - [`result`](#result) - [`rerender`](#rerender-1) + - [`unmount`](#unmount-1) --- @@ -324,6 +325,12 @@ All it does is forward all arguments to the act function if your version of react supports `act`. It is recommended to use the import from `@testing-library/react` over `react-dom/test-utils` for consistency reasons. +```typescript +export const act: typeof reactAct extends undefined + ? (callback: () => void) => void + : typeof reactAct +``` + ## `renderHook` This is a convenience wrapper around `render` with a custom test component. The From 0abf22a717a935ac2362e01214a5b2a9828bf175 Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Thu, 26 Oct 2023 15:45:04 +0900 Subject: [PATCH 2/2] revert: act docs --- docs/react-testing-library/api.mdx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index a699e574c..70469612b 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -325,12 +325,6 @@ All it does is forward all arguments to the act function if your version of react supports `act`. It is recommended to use the import from `@testing-library/react` over `react-dom/test-utils` for consistency reasons. -```typescript -export const act: typeof reactAct extends undefined - ? (callback: () => void) => void - : typeof reactAct -``` - ## `renderHook` This is a convenience wrapper around `render` with a custom test component. The