Skip to content

Commit 1d5280f

Browse files
authored
Merge branch 'main' into svelte-onMount
2 parents 43bce31 + ac096ab commit 1d5280f

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

docs/react-testing-library/api.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ as these methods:
3232
- [`result`](#result)
3333
- [`rerender`](#rerender-1)
3434
- [`unmount`](#unmount-1)
35+
- [`configure`](#configure)
36+
- [`configure` Options](#configure-options)
3537

3638
---
3739

@@ -451,3 +453,24 @@ const {unmount} = renderHook(({name = 'Alice'} = {}) => name)
451453

452454
unmount()
453455
```
456+
457+
## `configure`
458+
459+
Changes global options. Basic usage can be seen at
460+
[Configuration Options](dom-testing-library/api-configuration.mdx).
461+
462+
React Testing Library also has dedicated options.
463+
464+
```typescript
465+
import {configure} from '@testing-library/react'
466+
467+
configure({reactStrictMode: true})
468+
```
469+
470+
## `configure` Options
471+
472+
### `reactStrictMode`
473+
474+
When enabled, [`<StrictMode>`](https://react.dev/reference/react/StrictMode) is
475+
rendered around the inner element. Defaults to `false`.
476+

docs/react-testing-library/cheatsheet.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ See [Events API](dom-testing-library/api-events.mdx)
131131
## Other
132132

133133
See [Querying Within Elements](dom-testing-library/api-within.mdx),
134-
[Config API](dom-testing-library/api-configuration.mdx),
134+
[Config API](react-testing-library/api.mdx#configure),
135135
[Cleanup](react-testing-library/api.mdx#cleanup),
136136

137137
- **within** take a node and return an object with all the queries bound to the

0 commit comments

Comments
 (0)