mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-13 09:00:30 +08:00
Remove cleanup-after-each example (#7620)
cleanup is called now by default after each test if the testing framework supports the afterEach global
This commit is contained in:
@@ -191,8 +191,6 @@ Similar to `enzyme` you can create a `src/setupTests.js` file to avoid boilerpla
|
||||
|
||||
```js
|
||||
// react-testing-library renders your components to document.body,
|
||||
// this will ensure they're removed after each test.
|
||||
import '@testing-library/react/cleanup-after-each';
|
||||
// this adds jest-dom's custom assertions
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user