Packages

@testing-library/react

16.3.3 · 27 Aug 2026MIT89.5M / weekRepositoryHomepagenpmAtom feed

Upgrading @testing-library/react From 8.0.9 to 9.0.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 8.0.9Latest16.3.3
  1. 8.0.9yours
  2. 9.0.0target
3
changes to make
0
advisories fixed
1
new
0
fixes

Before you upgrade

Tick each one off as you go
  • breaking9.0.0
  • breaking9.0.0
  • breaking9.0.0

Release by release

  1. 9.0.0

    Migration needed9 Aug 20191 new
    • breaking

      deps: If you were using debugDOM before, use prettyDOM instead. Note that debugDOM is different from debug which you get back from render. That is unchanged.

    • breaking

      cleanup: If your tests were not isolated before (and you referenced the same component between tests) then this change will break your tests. You should keep your tests isolated, but if you're unable/unwilling to do that right away, then you can either run your tests with the environment variable RTL_SKIP_AUTO_CLEANUP set to true or import @testing-library/react/pure instead of @testing-library/react.

    • breaking

      cleanup-after-each: If any of your code has import '@testing-library/react/cleanup-after-each' then you need to remove that. It's happening automatically now.

    • new

      cleanup: automatically cleanup if afterEach is detected (#430) (e2d2572), closes #428

1 internal line (docs, tests, tooling) left out.