callstackincubator/react-native-harness
소개
Harness brings Jest-style tests to real native environments so you can test TurboModules like you would test your React Native app: with JavaScript.
웹 및 앱 개발What you can do
- Jest-Style Syntax, Native Power: Write familiar describe/it tests that run in real iOS and Android environments with full native module access.
- Best of Both Worlds: Unlike Jest (Node.js only) or Maestro (UI-based), get convenient test syntax AND native environment execution.
- Real Device, Simulator & Web Testing: Execute tests on iOS simulators, Android emulators, or in a browser (Web) — catch platform-specific issues Jest can't see.
- Native Module Testing: Test native modules, platform APIs, and device-specific functionality that's impossible with JavaScript-only runners.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Jest-style tool for testing native behavior directly on devices
Bridge the testing gap: Jest-style tests in real native environments. Get the convenience of describe/it with full access to native modules.
Features
- Jest-Style Syntax, Native Power: Write familiar describe/it tests that run in real iOS and Android environments with full native module access.
- Best of Both Worlds: Unlike Jest (Node.js only) or Maestro (UI-based), get convenient test syntax AND native environment execution.
- Real Device, Simulator & Web Testing: Execute tests on iOS simulators, Android emulators, or in a browser (Web) — catch platform-specific issues Jest can't see.
- Native Module Testing: Test native modules, platform APIs, and device-specific functionality that's impossible with JavaScript-only runners.
- Familiar Test Structure: Use beforeEach, afterEach, describe, it, expect — all the testing patterns you know and love from Jest.
- Zero Configuration Setup: Drop-in replacement for your existing test workflow with TypeScript support and seamless CI/CD integration.
Quick Configuration Example
// rn-harness.config.mjs
import {
androidPlatform,
androidEmulator,
physicalAndroidDevice,
} from '@react-native-harness/platform-android';
import {
applePlatform,
applePhysicalDevice,
appleSimulator,
} from '@react-native-harness/platform-apple';
const config = {
entryPoint: './src/main.tsx',
appRegistryComponentName: 'MyApp',
runners: [
androidPlatform({
name: 'android',
device: androidEmulator('Pixel_8_API_35'),
bundleId: 'com.myapp',
}),
applePlatform({
name: 'ios',
device: appleSimulator('iPhone 16 Pro Max', '18.0'),
bundleId: 'com.myapp',
}),
],
defaultRunner: 'android',
};
export default config;
Documentation
The documentation is available at react-native-harness.dev. You can also use the following links to jump to specific topics:
- Quick Start
- Configuration (Metro port, plugins, timeouts, coverage, and more)
- Problem Statement
- Feature Comparison
- Running in CI/CD
- API Reference
Made with ❤️ at Callstack
react-native-harness is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!
Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥
관련 프로젝트 살펴보기
불러오는 중…