npm / @testing-library/react-native
@testing-library/react-native
What changed in @testing-library/react-native 12 to 14, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
41 breaking1 deprecations5 new APIs and options9 behavior and defaults1 tooling4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@testing-library/react-native 1447 changes
Breaking changes 30
Accessible names more closely follow React Native inputs, including TextInput placeholder handling, child-name concatenation, and stricter getByRole name matching.
act always returns Promise<T> and should always be awaited, including when its callback is synchronous.
The concurrentRoot render and configuration option was removed because concurrent rendering is always enabled.
The createNodeMock render option was removed because the new Test Renderer integration does not support it.
press creates a default synthetic native event object and deep-merges passed event props into it, so exact-object assertions may need partial matching.
scroll creates a default synthetic native event object and deep-merges passed event props into it, so exact-object assertions may need partial matching.
fireEvent() and its helpers are async by default and return Promise<void>; callers must await them.
The fireEventAsync API was removed; use fireEvent instead.
The getQueriesForElement alias was removed; use within instead.
Previously rendered content hidden by React receives display: 'none' while preserving existing styles, affecting visibility queries and matchers.
The minimum supported Node.js version is now ^22.13.0 || >=24.
React 19.0.0 or newer is now required; React 18 is no longer supported.
The minimum supported React Native version is now 0.78.
render() is async by default and returns Promise<RenderResult>; callers must await it.
The renderAsync API was removed; use render instead.
Query results and the rendered element tree expose host elements only; composite components are no longer visible.
renderHook() is async by default and returns Promise<RenderHookResult>; callers must await it.
The renderHookAsync API was removed; use renderHook instead.
rerender now returns a Promise<void>; callers should await it.
This codemod adds await to RNTL async calls and makes test functions async when needed.
A codemod updates dependencies by removing React Test Renderer packages, adding Test Renderer, and updating React Native Testing Library.
The deprecated React Test Renderer integration was replaced with Test Renderer, which is now a peer dependency; install the compatibility line matching your React 19 minor version.
Type definitions now use TestInstance from Test Renderer instead of ReactTestInstance from React Test Renderer.
Text strings rendered outside React Native Text components now throw, matching React Native runtime behavior.
The legacy UNSAFE_getAllByProps query was removed.
The legacy UNSAFE_getByProps query was removed.
Legacy type and props queries were removed; use standard queries that target host elements.
UNSAFE_root was removed; use container for the pseudo-element container or root for the first rendered host element.
The render option was removed because text string validation is now always enabled.
The update alias was removed; use rerender instead.
Deprecations 1
Bubbling of direct events in fireEvent is deprecated.
New APIs and options 4
Adds UserEvent support for accessibilityAction.
Adds fireEvent.layout for firing layout events, including direct events.
Adds UserEvent pullToRefresh() for testing pull-to-refresh interactions.
The container API was reintroduced as a safe pseudo-element container aligned with React Testing Library semantics.
Behavior and default changes 7
Warns when firing events on disabled elements.
act() always returns a Promise and should always be awaited.
fireEvent.press() passes a default synthetic native event object to handlers and deep-merges event props supplied by the test.
fireEvent.scroll() passes a default synthetic native event object to handlers and deep-merges event props supplied by the test.
Suspended or hidden instances are represented with React Native-like hidden props such as display: 'none', bringing visibility queries and matchers closer to runtime behavior.
configure, render, renderHook, and userEvent.setup warn when passed unknown options, helping catch stale or misspelled options during migration.
unmount now returns a Promise<void>; callers should await it.
Tooling 1
A codemod updates test code for async render, renderHook, fireEvent, act, rerender, and unmount usage.
Fixes and other changes 4
Adds support for React Native 0.88 with React 19.3.
Fixes a setImmediate fake timer issue with jsdom.
Includes selection in the TextInput change event generated by user-event.
Cleans up waitFor timers when an error occurs during onTimeout printout.
@testing-library/react-native 138 changes
Breaking changes 6
These queries were removed; use *ByRole queries or the toHaveAccessibilityState matcher instead.
These queries were removed; use *ByRole queries or the toHaveAccessibleValue matcher instead.
The debug.shallow method was removed.
Host component name auto-detection was removed; the notes say tests should run faster.
The @testing-library/react-native Jest preset was removed; use the regular react-native Jest preset.
Support for React 16 and 17 was removed; React 18 and 19 are supported.
Behavior and default changes 2
Concurrent rendering is enabled by default.
Importing @testing-library/react-native automatically extends Jest matchers; importing @testing-library/react-native/extend-expect is no longer needed.
@testing-library/react-native 126 changes
Breaking changes 5
All queries exclude elements hidden from accessibility by default.
*ByRole queries now return only accessibility elements.
These queries now return host elements.
The container API was renamed to UNSAFE_root.
Introduced as the renamed container API.
New APIs and options 1
A safe root API was added.