Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0408e91
wip: replace basic types
mdjastrzebski Jan 1, 2026
7d3dbfa
remove concurrentRoot
mdjastrzebski Jan 1, 2026
d1eae83
wip: remove TestRendererOptions
mdjastrzebski Jan 1, 2026
4862d40
remove stringValidation
mdjastrzebski Jan 1, 2026
49cd8b0
refactor UNSAFE_root
mdjastrzebski Jan 1, 2026
3dd82aa
remove unsafe queries
mdjastrzebski Jan 1, 2026
8fd62b8
remove UNSAFE_* queries
mdjastrzebski Jan 1, 2026
e10f752
fix rest types
mdjastrzebski Jan 1, 2026
11b58f0
disable ensure peer deps
mdjastrzebski Jan 1, 2026
80d3fa0
recreate snapshots
mdjastrzebski Jan 1, 2026
ef3f5ca
remove getHostParent
mdjastrzebski Jan 1, 2026
519000c
remove getHostChildren
mdjastrzebski Jan 1, 2026
c82b906
refactor component tree & fire event
mdjastrzebski Jan 2, 2026
d7c83fd
migrate fire event
mdjastrzebski Jan 2, 2026
666492c
fix remaining tests
mdjastrzebski Jan 2, 2026
2a7f330
fix lint
mdjastrzebski Jan 2, 2026
a5c106c
flatten testGateReact19
mdjastrzebski Jan 2, 2026
a47f134
clone 14 docs
mdjastrzebski Jan 2, 2026
146a64f
naming tweaks
mdjastrzebski Jan 2, 2026
cf26b90
chore: use UTR findAll
mdjastrzebski Jan 2, 2026
9b95bd5
reduce toJSON usage
mdjastrzebski Jan 2, 2026
d963ff6
migrate to queryAll
mdjastrzebski Jan 2, 2026
1ccb8f7
v14
mdjastrzebski Jan 2, 2026
a29824d
fix lint
mdjastrzebski Jan 2, 2026
69d0a15
chore: release v14.0.0-alpha.2
mdjastrzebski Jan 2, 2026
79e5477
yarn.lock
mdjastrzebski Jan 2, 2026
33dc866
smarter toJSON output
mdjastrzebski Jan 2, 2026
e93af81
chore: release v14.0.0-alpha.3
mdjastrzebski Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ labels: 'bug report'
<!--
run following command in terminal of your root project and paste the result down

`npx envinfo --npmPackages react,react-native,react-test-renderer,@testing-library/react-native`
`npx envinfo --npmPackages react,react-native,universal-test-renderer,@testing-library/react-native`
-->
4 changes: 2 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ npmMinimalAgeGate: '3d'
npmPreapprovedPackages:
- react
- react-native
- react-test-renderer
- universal-test-renderer
- '@react-native/*'
- '@types/react'
- '@types/react-test-renderer'
- '@types/universal-test-renderer'
- hermes-compiler

yarnPath: .yarn/releases/yarn-4.11.0.cjs
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is the **React Native Testing Library (RNTL)** - a comprehensive testing solution for React Native applications that provides React Native runtime simulation on top of `react-test-renderer`. The library encourages better testing practices by focusing on testing behavior rather than implementation details.
This is the **React Native Testing Library (RNTL)** - a comprehensive testing solution for React Native applications that provides React Native runtime simulation on top of `universal-test-renderer`. The library encourages better testing practices by focusing on testing behavior rather than implementation details.

## Key Development Commands

Expand Down Expand Up @@ -37,7 +37,7 @@ To test a specific file: `yarn test path/to/test.test.tsx`

1. **`src/index.ts`** - Main entry point that sets up auto-cleanup and extends Jest matchers
2. **`src/pure.ts`** - Pure exports without auto-cleanup for advanced use cases
3. **`src/render.tsx`** - Core rendering functionality using `react-test-renderer`
3. **`src/render.tsx`** - Core rendering functionality using `universal-test-renderer`
4. **`src/screen.ts`** - Global screen object providing access to rendered components

### Key Modules
Expand Down Expand Up @@ -131,7 +131,7 @@ The build creates:

## Testing Environment

- Uses `react-test-renderer` for component rendering
- Uses `universal-test-renderer` for component rendering
- Fake timers recommended for user events
- String validation available for text rendering checks
- Supports both concurrent and legacy React rendering modes
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You want to write maintainable tests for your React Native components. As a part

## This solution

The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `react-test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:
The React Native Testing Library (RNTL) is a comprehensive solution for testing React Native components. It provides React Native runtime simulation on top of `universal-test-renderer`, in a way that encourages better testing practices. Its primary guiding principle is:

> The more your tests resemble the way your software is used, the more confidence they can give you.

Expand All @@ -36,7 +36,7 @@ yarn add --dev @testing-library/react-native
npm install --save-dev @testing-library/react-native
```

This library has a `peerDependencies` listing for `react-test-renderer`. Make sure that your `react-test-renderer` version matches exactly the `react` version, avoid using `^` in version number.
This library has a `peerDependencies` listing for `universal-test-renderer`. Make sure that your `universal-test-renderer` version matches exactly the `react` version, avoid using `^` in version number.

### Additional Jest matchers

Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default [
'react-native-a11y/has-valid-accessibility-ignores-invert-colors': 'off',
'react-native-a11y/has-valid-accessibility-value': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'jest/no-standalone-expect': ['error', { additionalTestBlockFunctions: ['testGateReact19'] }],
},
},
];
3 changes: 0 additions & 3 deletions jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ import { resetToDefaults, configure } from './src/pure';

beforeEach(() => {
resetToDefaults();
if (process.env.CONCURRENT_MODE === '0') {
configure({ concurrentRoot: false });
}
});
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@testing-library/react-native",
"version": "13.3.3",
"version": "14.0.0-alpha.3",
"description": "Simple and complete React Native testing utilities that encourage good testing practices.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down Expand Up @@ -36,6 +36,7 @@
"build": "yarn clean && yarn build:js && yarn build:ts && yarn copy-flowtypes",
"release": "release-it",
"release:rc": "release-it --preRelease=rc",
"release:alpha": "release-it --preRelease=alpha",
"prettier": "prettier --check .",
"prettier:write": "prettier --write ."
},
Expand All @@ -56,9 +57,9 @@
},
"peerDependencies": {
"jest": ">=29.0.0",
"react": ">=18.2.0",
"react": ">=19.0.0",
"react-native": ">=0.71",
"react-test-renderer": ">=18.2.0"
"universal-test-renderer": "~0.10.1"
},
"peerDependenciesMeta": {
"jest": {
Expand All @@ -80,7 +81,6 @@
"@types/jest": "^30.0.0",
"@types/node": "^24.10.1",
"@types/react": "^19.2.6",
"@types/react-test-renderer": "^19.1.0",
"babel-jest": "^30.2.0",
"babel-plugin-module-resolver": "^5.0.2",
"del-cli": "^7.0.0",
Expand All @@ -92,10 +92,10 @@
"react": "19.1.1",
"react-native": "0.82.1",
"react-native-gesture-handler": "^2.29.1",
"react-test-renderer": "19.1.1",
"release-it": "^19.0.6",
"typescript": "^5.9.3",
"typescript-eslint": "^8.47.0"
"typescript-eslint": "^8.47.0",
"universal-test-renderer": "0.10.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
Loading
Loading