Repository navigation
Conversation
executeRun now keeps the test that started on the device but has not finished yet, and clears it when a new file starts. When the file fails with a runtime failure (native crash, runtime or bridge disconnect, startup stall, device not responding), the failure message gets a `Running test: "Suite › test"` line under its headline. Failures outside a test keep their current message.
|
@mrousavy is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
mrousavy
added a commit
to margelo/nitro
that referenced
this pull request
Oct 15, 2026
#1696) Harness itself will name the test that was running when the app crashed once callstackincubator/react-native-harness#204 is released, so the plugin can be removed then.
mrousavy
added a commit
to margelo/react-native-nitro-modules
that referenced
this pull request
Oct 15, 2026
…y (#1696) Harness itself will name the test that was running when the app crashed once callstackincubator/react-native-harness#204 is released, so the plugin can be removed then.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
When the app crashes, the bridge disconnects, or the device stops responding while a test file is running, Harness fails the whole file with a message like "The app bridge disconnected during test execution." The message doesn't say which test was running. In a file with dozens of tests, finding the one that took the app down means splitting the file and rerunning until you've narrowed it down. In Nitro we split one file into 36 to find a single Hermes crash.
With this change the failure names the test that was running:
How does it work?
The device already sends
test-startedandtest-finishedevents for every test, andexecuteRunforwards them to Jest. It now also keeps the last test that started and hasn't finished, and clears it when a new file starts. Tests run one at a time, so that's the test the app was in when it went away. If the file then fails with a runtime failure (native crash, runtime or bridge disconnect, startup stall, or device not responding), aRunning test:line goes right under the first line of the failure message. The name is the ancestor titles and the test name joined with›, the way Jest titles failures.beforeEachandafterEachrun inside a test's started/finished window, so a crash there points at that test.When no test was running, for example during startup, test collection, or a
beforeAll/afterAllhook, the message stays as it is today. The host only knows what the device reported, so if the app dies before itstest-startedevent reaches the host, the message also stays the same.Why is this useful?
One run is enough to see which test crashed the app, locally or in CI, without splitting the file. That matters most for crashes that only happen on certain devices or in CI, where every rerun is slow. Projects that track this today with a plugin listening to
test:startedand the crash hooks (Nitro does, in margelo/nitro#1695) can drop it.