diff --git a/docs/react-testing-library/api.mdx b/docs/react-testing-library/api.mdx index 47c34d2a4..359bc1134 100644 --- a/docs/react-testing-library/api.mdx +++ b/docs/react-testing-library/api.mdx @@ -32,6 +32,8 @@ as these methods: - [`result`](#result) - [`rerender`](#rerender-1) - [`unmount`](#unmount-1) +- [`configure`](#configure) +- [`configure` Options](#configure-options) --- @@ -451,3 +453,24 @@ const {unmount} = renderHook(({name = 'Alice'} = {}) => name) unmount() ``` + +## `configure` + +Changes global options. Basic usage can be seen at +[Configuration Options](dom-testing-library/api-configuration.mdx). + +React Testing Library also has dedicated options. + +```typescript +import {configure} from '@testing-library/react' + +configure({reactStrictMode: true}) +``` + +## `configure` Options + +### `reactStrictMode` + +When enabled, [``](https://react.dev/reference/react/StrictMode) is +rendered around the inner element. Defaults to `false`. + diff --git a/docs/react-testing-library/cheatsheet.mdx b/docs/react-testing-library/cheatsheet.mdx index d0e3341be..53da683d3 100644 --- a/docs/react-testing-library/cheatsheet.mdx +++ b/docs/react-testing-library/cheatsheet.mdx @@ -131,7 +131,7 @@ See [Events API](dom-testing-library/api-events.mdx) ## Other See [Querying Within Elements](dom-testing-library/api-within.mdx), -[Config API](dom-testing-library/api-configuration.mdx), +[Config API](react-testing-library/api.mdx#configure), [Cleanup](react-testing-library/api.mdx#cleanup), - **within** take a node and return an object with all the queries bound to the