Registry / testing / react-native-test-app

react-native-test-app

JSON →
library5.1.2jsnpmunverified

react-native-test-app (RNTA) is a command-line utility and package designed to streamline the creation and management of native test applications for React Native libraries across multiple platforms, including Android, iOS, macOS, Windows, and visionOS. It abstracts away the complexities of native build configurations, allowing library maintainers to focus on their JavaScript/TypeScript code. The current stable version is 5.1.2, released in April 2026. The package maintains a frequent release cadence, with minor versions and patch fixes regularly introducing new features, extending support for newer React Native versions, and addressing platform-specific issues. Its key differentiator is its ability to provide a consistent, up-to-date test environment across various React Native ecosystem versions and operating systems, significantly simplifying CI/CD pipelines and local development for cross-platform libraries.

npm install react-native-test-app
INSTALL
IMPORT
SIG · REACT-NATIVE-TEST-
R
react-native-test-app
testingjavascriptv5.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Demonstrates initializing a new multi-platform React Native test application project using the `npx` command.

npx --package react-native-test-app@$(npm view react-native-test-app version) init # Follow the prompts to name your app, select platforms (e.g., Android, iOS, Windows), # and specify the project location. For example: # What is the name of your test app? … myTestApp # Which platforms do you need test apps for? › Android, iOS, Windows # Where should we create the new project? … myTestApp cd myTestApp npm install # or yarn # After installation, refer to platform-specific instructions in the wiki # (e.g., 'npm run android' or 'npx react-native run-ios') to build and run.
react-native-test-app --version
Debug
Known issues
breakingreact-native-test-app has strict peer dependency ranges for `react` and `react-native`. Upgrading your `react-native` or `react` versions likely requires an update to a compatible `react-native-test-app` version.
fix
Always check the `peerDependencies` in the `package.json` for `react-native-test-app` or its GitHub releases to ensure compatibility before upgrading. For example, `react-native-test-app` v5.0.8 requires `react` 19.2 for `react-native` 0.83.
affects: >=5.0.0
gotchaUsing `npx --package react-native-test-app@latest init` is not recommended. Due to npm caching behavior, it may not fetch the absolute latest version, potentially leading to issues or missing recent compatibility fixes.
fix
Use `npx --package react-native-test-app@<version> init` specifying the exact version, or `npx --package react-native-test-app@$(npm view react-native-test-app version) init` to programmatically get the latest published version.
affects: >=1.0.0
gotchaAfter generating the test app, platform-specific build tools and environment configurations are still required. The tool generates native projects, but building and running still depend on a correctly set up development environment.
fix
Follow the 'Platform Specific Instructions' linked in the project's wiki after running `init` and installing npm dependencies. This includes setting up Xcode for iOS/macOS, Android Studio for Android, and Visual Studio for Windows.
affects: >=1.0.0
gotchaThe package explicitly requires Node.js version 18.12 or newer. Using an older Node.js version can lead to installation failures or unexpected behavior.
fix
Ensure your Node.js environment meets the `>=18.12` requirement. Use a Node Version Manager (e.g., `nvm` or `volta`) to switch to a compatible Node.js version.
affects: >=5.0.0
Errors
Common errors & fixes
Error: EPERM: operation not permitted, unlink '...'
File permission issues during package installation or project creation, often on Windows due to antivirus or administrative privileges.
fix
Try running your terminal as an administrator, or temporarily disable antivirus software. Ensure there are no lingering `node_modules` or `.git` folders from previous failed attempts.
npm ERR! While resolving: your-project@1.0.0 npm ERR! Found: react-native@X.Y.Z npm ERR! ... npm ERR! Could not resolve dependency: npm ERR! peer react-native@'^A.B.C' from react-native-test-app@D.E.F
Mismatch between your project's `react-native` version and the version `react-native-test-app` is compatible with (its peer dependency).
fix
Check the `peerDependencies` of the `react-native-test-app` version you are trying to use. Upgrade or downgrade `react-native-test-app` to a version that supports your `react-native` version, or adjust your `react-native` version accordingly. Often, installing the latest `react-native-test-app` will declare support for the latest `react-native` releases.
TypeError: Cannot read properties of undefined (reading 'init')
The `npx` command failed to properly execute the `init` script, possibly due to a corrupted package download or an issue with the npm registry.
fix
Clear your npm cache (`npm cache clean --force`) and try the `npx` command again. Ensure you are using a recent version of npm/node.
Upgrade
Version history
5.1.2latest on npm
Audit
Dependencies
@callstack/react-native-visionosoptionalPeer dependency for visionOS platform support.
@expo/config-pluginsoptionalRequired for configuration plugin support, potentially for Expo-related setups.
reactrequiredCore React library, strict versioning required to match React Native.
react-nativerequiredCore React Native library, strict versioning required for compatibility.
react-native-macosoptionalPeer dependency for macOS platform support.
react-native-windowsoptionalPeer dependency for Windows platform support.
Agent activity
2 hits · last 30 days
node
2
Resources
react-native-test-app — npm install react-native-test-app · libregistry