The speaker says the libraries have similar APIs but work differently under the hood. React Native Testing Library came first; the official Testing Library version was created later. After discussions with Kent, the creator of Testing Library, the teams kept both libraries.
How React Native Testing Library is different from Native Testing Library
An unnamed Callstack main speaker explains how React Native Testing Library differs from the official React Native Testing Library, in a conversation with an unnamed host.
The speaker describes React Native Testing Library as community-driven and developed by Callstack. It aims to keep a thin layer over React Test Renderer and leave fixes for React Native APIs to React Native itself. The other library adds workarounds for issues such as broken native mocks, which the speaker says has contributed to maintenance problems.
Version one included shallow rendering and some unsafe queries that did not follow Testing Library's guiding principles. Because many users, including Callstack clients, depended on those APIs, the team planned gradual changes rather than breaking compatibility at once. Version two, released a few weeks before the conversation, removed or renamed some risky APIs and added compatibility with community ESLint tools and custom Jest matchers.
The speaker says few upgrade problems had been reported in the weeks after version two, which they took as a sign that users could migrate gradually. The release also prompted renewed discussion with Kent about resolving the split. The speaker says React Native Testing Library might become the single library, with the other phased out, once a migration strategy is in place.
Takeaways
- Similar APIs do not mean two testing libraries behave the same under the hood.
- A thin testing abstraction can avoid taking responsibility for fixing React Native internals.
- When users depend on unsafe APIs, a gradual migration can reduce upgrade disruption.
- Compatibility with lint rules and custom matchers can make a testing library easier to adopt.
- Consolidating competing libraries depends on a clear migration strategy, even when their APIs are similar.
Mentioned in this talk
Search inside this talk
What was claimed 6
- integrates with
React Native Testing Library integrates with Testing Library
“We use the same APIs as React Testing Library”
1:08inReact Native Testing Library 2.0 - what's new?YouTube Verified2 sources· Talk
- featureNative Testing Library: Was renamed as the official Testing Library for React Native
“The Native Testing Library, which was renamed as the official Testing Library for React Native”
YouTube Unverified1 source· Talk
- usesa thin abstraction layer
“we use React Test Renderer”
1:10inWhat Is React Native Testing LibraryYouTube Verified4 sources· Talk
- built
“developed by Callstack”
YouTube Verified4 sources· Talk
- feature
React Native Testing Library: Version one allowed shallow rendering and included unsafe queries“in version one, we allowed shallow rendering and introduced some unsafe queries”
YouTube Unverified1 source· Talk
- launched
React Native Testing Library: Version 2“v2, which was released a few weeks ago”
YouTube Unverified1 source· Talk









