Releases: callstack/react-native-testing-library
v14.0.0-rc.0
14.0.0-rc.0 (2026-05-07)
Migration guide
See the Migration to 14.x guide for
step-by-step upgrade instructions, codemods, and before/after examples.
Breaking changes
- Dropped support for React 18. React 19.0.0 or newer is now required.
- Raised the minimum supported React Native version to 0.78.
- Raised the minimum supported Node.js version to
^22.13.0 || >=24. - Replaced the deprecated React Test Renderer with
Test Renderer. - Added a peer dependency on Test Renderer 1.x. Install the Test Renderer compatibility line
that matches your React 19 minor version. - Made the core rendering and event APIs async by default:
render()now returnsPromise<RenderResult>.renderHook()now returnsPromise<RenderHookResult>.fireEvent()and its helpers now returnPromise<void>.act()now always returns a Promise and should always be awaited.
- Removed the
renderAsync,renderHookAsync, andfireEventAsyncAPIs. Userender,
renderHook, andfireEventinstead. - Removed the
updatealias. Usererenderinstead. - Removed the
getQueriesForElementalias. Usewithininstead. - Removed
UNSAFE_root. Usecontainerfor the pseudo-element container orrootfor
the first rendered host element. - Removed legacy
UNSAFE_*queries:UNSAFE_getAllByTypeUNSAFE_getByTypeUNSAFE_getAllByPropsUNSAFE_getByProps
- Removed the
concurrentRootrender and configuration option. Concurrent rendering is
always enabled in v14. - Removed the
createNodeMockrender option, which is not supported by the new Test Renderer
integration. - Removed the
unstable_validateStringsRenderedWithinTextrender option. Text string
validation is now always enabled.
Notable changes
- Reintroduced the
containerAPI as a safe pseudo-element container, aligned with React
Testing Library semantics. - Query results and the rendered element tree now expose host elements only. Composite
components are no longer visible through the test tree. - Type definitions now use
TestInstancefrom Test Renderer instead of
ReactTestInstancefrom React Test Renderer. - Suspended or hidden instances are now represented with React Native-like hidden props, such
asdisplay: 'none', so visibility queries and matchers behave closer to runtime behavior. fireEvent.press()andfireEvent.scroll()now pass default synthetic native event objects
to handlers and deep-merge any event props supplied by the test.- Accessible name calculation now follows React Native inputs more closely, including
TextInputplaceholder handling, child accessible name concatenation, and stricter
getByRole(..., { name })matching. configure,render,renderHook, anduserEvent.setupnow warn when unknown options are
passed, helping catch stale or misspelled options during migration.- Text strings rendered outside of React Native
<Text>components now throw, matching
React Native runtime behavior.
Test Renderer versions
Install the Test Renderer version that matches your React 19 minor version:
| React version | Recommended Test Renderer version |
|---|---|
19.2 |
test-renderer@1.2 |
19.1 |
test-renderer@1.1 |
19.0 |
test-renderer@1.0 |
Older Test Renderer lines may not support newer React 19 features in tests. Newer Test
Renderer lines can produce peer dependency warnings, or an install error with npm. See the
Test Renderer React 19 compatibility lines
for the latest recommendations.
Codemods
Two codemods are available to automate the most common v14 upgrade work:
rntl-v14-update-depsupdates dependencies by removing React Test Renderer packages,
adding Test Renderer, and updating React Native Testing Library.rntl-v14-async-functionsupdates test code for asyncrender,renderHook,fireEvent,
act,rerender, andunmountusage.
Full changelog
See the full GitHub comparison:
v13.3.3...v14.0.0-rc.0
v14.0.0-beta.1
v14.0.0-beta.0
14.0.0-beta.0 (2026-01-20)
Note
This is a beta release. APIs and behavior may change.
What's new
React 19 and React Native 0.78+
- Drops support for React 18.
- Requires React 19.0.0+ and React Native 0.78+.
Async APIs
The main APIs are now async to support React 19's async rendering (Suspense, use()):
render,renderHook,fireEvent, andactreturn Promises and must be awaited.- This flushes pending React updates before your assertions run.
New renderer
- Replaced deprecated
react-test-rendererwith Test Renderer. - Improved DX (
HostElementreplacesReactTestInstance).
container API
screen.containeris now safe to use.- Returns a pseudo-element container wrapping the rendered elements.
Breaking changes
- Removed APIs:
update(usererender),getQueriesForElement(usewithin),UNSAFE_root(usecontainer), andconcurrentRootoption. - Removed legacy queries:
UNSAFE_getAllByType,UNSAFE_getByType,UNSAFE_getAllByProps, andUNSAFE_getByProps. Use standard queries likegetByRole. - Strict text validation: Text strings must be rendered within a
<Text>component. Theunstable_validateStringsRenderedWithinTextoption has been removed; validation is always on.
Migration
Use the codemods to upgrade:
-
Update dependencies:
npx codemod@latest rntl-v14-update-deps --target . npm install -
Migrate to async:
npx codemod@latest rntl-v14-async-functions --target ./src
See the v14 Migration Guide for details.
v14.0.0-alpha.6
14.0.0-alpha.6 (2026-01-09)
What's Changed
- v14 (alpha) - React 19 only, uses new renderer by @mdjastrzebski in #1705
- chore: unify nightly jobs by @mdjastrzebski in #1852
- chore: nightly CI for v13 by @mdjastrzebski in #1853
- chore: test-renderer 0.13 by @mdjastrzebski in #1854
- refactor: remove unsafe sync functions by @mdjastrzebski in #1855
- refactor: remove deprecated aliases:
updateandgetQueriesForElementby @mdjastrzebski in #1856 - chore: rewrite
rendertests by @mdjastrzebski in #1859
Full Changelog: v14.0.0-alpha.5...v14.0.0-alpha.6
v14.0.0-alpha.5
14.0.0-alpha.5 (2026-01-06)
- renaming:
renderAsync=>render,render=>unsafe_renderSyncrenderHookAsync=>renderHook,renderHook=>unsafe_renderHookSyncfireEventAsync=>fireEvent,fireEvent=>unsafe_fireEventSyncactAsync=>act,act=>unsafe_act
v14.0.0-alpha.4
14.0.0-alpha.4 (2026-01-04)
- make
renderHookasync by default
v14.0.0-alpha.3
14.0.0-alpha.3 (2026-01-02)
- improved
toJSONoutput
v14.0.0-alpha.2
14.0.0-alpha.2 (2026-01-02)
v14 is back:
- rebased, to latest v13
- proper
fireEventsupport with newunstable_fiberapi from UTR - some rough edges still remain (it's alpha)