@@ -154,9 +154,8 @@ module.exports = {
154
154
}
155
155
` ` `
156
156
157
- Alternatively , you can change your test to import from ` @testing-library/react-hooks/pure ` instead
158
- of the regular imports. This applies to any of our export methods documented in
159
- [Rendering ](/installation #being -specific ).
157
+ Alternatively , you can change your test to import from ` @testing-library/react-hooks/pure ` (or any
158
+ of the [other non -pure imports ](/installation #pure -imports )) instead of the regular imports.
160
159
161
160
```diff
162
161
- import { renderHook , cleanup , act } from ' @testing-library/react-hooks'
@@ -282,10 +281,11 @@ used to wrap the hook call includes an
282
281
[significant amount of output noise ](https : // reactjs.org/docs/error-boundaries.html#component-stack-traces)
283
282
in tests .
284
283
285
- To keep test output clean , we patch ` console.error ` when ` renderHook ` is called to filter out the
286
- unnecessary logging and restore the original version during cleanup. This side -effect can affect
287
- tests that also patch ` console.error ` (e.g. to assert a specific error message get logged ) by
288
- replacing their custom implementation as well .
284
+ To keep test output clean , we patch ` console.error ` when importing from
285
+ ` @testing-library/react-hooks ` (or any of the [other non -pure imports ](/installation #pure -imports ))
286
+ to filter out the unnecessary logging and restore the original version during cleanup. This
287
+ side-effect can affect tests that also patch `console.error` (e.g. to assert a specific error
288
+ message get logged ) by replacing their custom implementation as well.
289
289
290
290
### Disabling `console.error` filtering
291
291
@@ -304,9 +304,8 @@ module.exports = {
304
304
}
305
305
` ` `
306
306
307
- Alternatively , you can change your test to import from ` @testing-library/react-hooks/pure ` instead
308
- of the regular imports. This applies to any of our export methods documented in
309
- [Rendering ](/installation #being -specific ).
307
+ Alternatively , you can change your test to import from ` @testing-library/react-hooks/pure ` (or any
308
+ of the [other non -pure imports ](/installation #pure -imports )) instead of the regular imports.
310
309
311
310
```diff
312
311
- import { renderHook , cleanup , act } from ' @testing-library/react-hooks'
0 commit comments