Luke Brandon Farrell’s Post

Callstack just built something that might finally close the gap between JavaScript tests and native reality. Meet React Native Harness — 𝗮 𝗯𝗿𝗮𝗻𝗱-𝗻𝗲𝘄 𝘁𝗲𝘀𝘁𝗶𝗻𝗴 𝘁𝗼𝗼𝗹 𝘁𝗵𝗮𝘁 𝗹𝗲𝘁𝘀 𝘆𝗼𝘂 𝗿𝘂𝗻 𝘁𝗲𝘀𝘁𝘀 𝗼𝗻 𝗿𝗲𝗮𝗹 𝗱𝗲𝘃𝗶𝗰𝗲𝘀, 𝗵𝗶𝘁𝘁𝗶𝗻𝗴 𝗮𝗰𝘁𝘂𝗮𝗹 𝗻𝗮𝘁𝗶𝘃𝗲 𝗺𝗼𝗱𝘂𝗹𝗲𝘀, without needing a full-blown end-to-end setup with Detox or Maestro. Think of it like Jest, if Jest could actually talk to your phone. Normally, unit tests never touch native code — Jest runs in Node.js, miles away from Swift or Kotlin. Harness changes that. 𝗜𝘁 𝗯𝘂𝗻𝗱𝗹𝗲𝘀 𝘆𝗼𝘂𝗿 𝘁𝗲𝘀𝘁 𝗳𝗶𝗹𝗲𝘀 𝘄𝗶𝘁𝗵 𝗠𝗲𝘁𝗿𝗼, 𝘀𝗵𝗶𝗽𝘀 𝘁𝗵𝗲𝗺 𝘁𝗼 𝗮 𝗛𝗲𝗿𝗺𝗲𝘀-𝗽𝗼𝘄𝗲𝗿𝗲𝗱 𝗿𝘂𝗻𝘁𝗶𝗺𝗲 𝗼𝗻 𝘆𝗼𝘂𝗿 𝗱𝗲𝘃𝗶𝗰𝗲 𝗼𝗿 𝘀𝗶𝗺𝘂𝗹𝗮𝘁𝗼𝗿, runs the tests inside the React Native environment, and sends the results back to your terminal. So instead of mocking NativeModules, you can call them directly. Yes — 𝗿𝗲𝗮𝗹 𝗻𝗮𝘁𝗶𝘃𝗲 𝗰𝗼𝗱𝗲, 𝗿𝗲𝗮𝗹 𝗱𝗲𝘃𝗶𝗰𝗲, 𝗿𝗲𝗮𝗹 𝗿𝗲𝘀𝘂𝗹𝘁𝘀. And here’s the best part: it still feels like Jest. ➡️ 𝗬𝗼𝘂 𝘄𝗿𝗶𝘁𝗲 𝘁𝗲𝘀𝘁𝘀 𝘄𝗶𝘁𝗵 𝗱𝗲𝘀𝗰𝗿𝗶𝗯𝗲, 𝘁𝗲𝘀𝘁, 𝗲𝘅𝗽𝗲𝗰𝘁, 𝗮𝗻𝗱 𝗹𝗶𝗳𝗲𝗰𝘆𝗰𝗹𝗲 𝗵𝗼𝗼𝗸𝘀 like beforeEach and afterAll. ➡️ But 𝘂𝗻𝗱𝗲𝗿 𝘁𝗵𝗲 𝗵𝗼𝗼𝗱, Harness is its own runner, built specifically for React Native — not Node. It’s the sweet spot we’ve been missing: ➡️ Faster than full E2E (no UI automation). ➡️ More realistic than mocked unit tests. ➡️ Perfect for library authors and anyone building native bridges in Swift, Kotlin, or C++. You can now verify your native module works on-device — no manual Xcode runs, no Detox setup, no guesswork. Would you run your next native test suite through Harness instead of Jest or Detox? 👇 #ReactNative #Testing #Callstack #Hermes #MobileDev #OpenSource #ReactNativeRewind #NativeModules #Jest #Detox

  • No alternative text description for this image

Source: https://github.com/callstackincubator/react-native-harness Want to go deeper on these updates? We break them down properly — with examples, visuals, and plain-English explanations of all the jargon that usually sends you digging through release notes. Catch the latest in our newsletter, The React Native Rewind 👇 https://thereactnativerewind.com

Like
Reply

To view or add a comment, sign in

Explore content categories