kentcdodds / jest-cypress-react-babel-webpack

Configure Jest for Testing JavaScript Applications and Install, Configure, and Script Cypress for JavaScript Web Applications on TestingJavaScript.com
https://testingjavascript.com
Other
512 stars 329 forks source link

react-testing-library has changed to @testing-library/react #22

Closed LluisArevalo closed 5 years ago

LluisArevalo commented 5 years ago

When we try to install the dev-dependency react-testing-library, it appears an error importing the modules indicating that we should use @testing-library/react instead.

The steps that I used to correct the error are:

  1. Install the @testing-library/react library as a dev-dependency.
  2. Import @testing-library/react/cleanup-after-each & {render} from @testing-library/react

After that, everything has worked perfectly!

kentcdodds commented 5 years ago

I'm currently working on an update to testingjavascript.com right now :)

Thanks!