@testing-library/react
16.3.3 · 27 Aug 2026MIT89.5M / weekRepositoryHomepagenpmAtom feed
103 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 11.x
11.0.4
13 Sep 2020Trigger ongot-/onlostpointercapture when calling got-/lostpointercapture
11.0.3
13 Sep 2020Trigger onPointerEnter/Leave when calling pointerEnter/Leave
11.0.2
3 Sep 2020cleanup: remove unnecessary async/await
11.0.1
3 Sep 2020Update typings for cleanup
11.0.0
2 Sep 2020- breaking
Cleanup is now synchronous and wraps the unmounting process in
act. Use act to flush instead of custom implementation
- 10.x
10.4.9
21 Aug 2020Only updates a dependency:@testing-library/dom 7.22.3
10.4.8
5 Aug 2020fireEvent: Make sure react dispatches focus/blur events
10.4.7
15 Jul 2020unmount: Flush useEffect cleanup functions syncronously
10.4.6
13 Jul 2020cleanup: remove scheduler code from flush-microtasks
10.4.5
8 Jul 2020flushMicroTasks: fallback to no scheduler
10.4.4
5 Jul 2020React next fails on build
10.4.3
25 Jun 2020cleanup: Cleanup should flush microtask queue after unmount
10.4.2
24 Jun 2020cleanup: microtask flushing now supports fake timers
10.4.1
23 Jun 2020Update @testing-library/dom to get a bug fix
10.4.0
23 Jun 2020Force update of @testing-library/dom
Features
Force update of @testing-library/dom
Latest DOM Testing Library release page: github.com/testing-library/dom-testing-library/…
The big feature is fake timers working with async utils out of the box
10.3.0
18 Jun 2020Update cheat sheet + added source file
10.2.0
4 Jun 2020Run cleanup() when test runner supports teardown()
10.0.6
2 Jun 2020Force update version of @testing-library/dom
10.0.5
1 Jun 2020fireEvent: automatically configure
fireEventto be wrapped in act
10.0.4
30 Apr 2020Upgrade all dependencies (and fix UMD build)
10.0.2
30 Mar 2020Bump types dependency
10.0.1
13 Mar 2020Support Node >=10
10.0.0
12 Mar 2020Flush microtasks in cleanup
Update
@testing-library/dom
Features
Flush microtasks in cleanup
Update
@testing-library/dom
Breaking changes
Update DOM Testing Library
The latest version of DOM Testing Library has several breaking changes you will want to review the changelog of DOM Testing Library v7.0.0 to ensure you are unaffected.
Drop Node 8
Node 10 or greater is required. Node 8 is out of LTS (#576) (fccc2cf), closes #575
remove deprecated
cleanup-after-each.jsThis file which did nothing but log a warning to the console
- import '@testing-library/react/cleanup-after-each' + // nothing! Just remove it
As a general reminder, you should NOT need to use
cleanupat all as this is done automatically for you (unless you're using@testing-library/react/purein which case you know what you're doing... keep usingcleanup).- 9.x
9.4.0
13 Dec 2019screen: add screen export
9.3.3
11 Dec 2019Support automatic types in pnpm installs
9.3.2
4 Nov 2019False positive warning about MessageChannel
9.3.1
30 Oct 2019Manually flush microtasks in afterEach
9.3.0
3 Oct 2019debug: allow debugging an array of containers
9.1.4
3 Sep 2019Console.error doesn't have to be a string in act.compat.js
9.1.3
16 Aug 2019Use apply for console error args when proxying
9.1.2
15 Aug 2019typescript: move typings to DefinitelyTyped
9.1.1
12 Aug 2019TS: act type
9.1.0
10 Aug 2019Add dont-cleanup-after-each.js
9.0.1
9 Aug 2019cleanup-after-each: remove cleanup-after-each file.
9.0.0
9 Aug 2019- breaking
deps: If you were using
debugDOMbefore, useprettyDOMinstead. Note thatdebugDOMis different fromdebugwhich you get back fromrender. 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_CLEANUPset totrueor import@testing-library/react/pureinstead 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.
Features
Breaking changes
- breaking
deps: If you were using
debugDOMbefore, useprettyDOMinstead. Note thatdebugDOMis different fromdebugwhich you get back fromrender. 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_CLEANUPset totrueor import@testing-library/react/pureinstead 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.
- 8.x
8.0.8
6 Aug 2019Make cleanup use async act
8.0.6
23 Jul 2019Async act detection
8.0.5
12 Jul 2019build output: the dist directory no longer includes tests
8.0.4
25 Jun 2019TS: use
Queriesfrom @testing-library/dom
8.0.3
25 Jun 2019TS: export
Queriesinterface
8.0.2
24 Jun 2019Specify baseElement without container