feat: Manual runtime test runs, one library at a time, with Reanimated preload#9929
Open
tjzel wants to merge 1 commit into
Open
feat: Manual runtime test runs, one library at a time, with Reanimated preload#9929tjzel wants to merge 1 commit into
tjzel wants to merge 1 commit into
Conversation
Collaborator
Author
|
Simulator verification (iPhone 17 Pro, iOS 26.5, Debug, Metro bundle from this branch stack):
Comment generated by AI. |
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.
Note
This PR description was AI-generated.
Stacked on #9928. Part 3 of the runtime-tests spec.
Summary
I made the manual in-app runtime test flow enforce running only one library per app session, and made the Reanimated preload explicit.
import 'react-native-reanimated'at the top of the Runtime Tests app-type. This guarantees Reanimated's commit hook installs at app boot — before any React commit — instead of relying on the Reanimated examples registry happening to import it first. Loading Reanimated after the first commit is the known race that crashes the experimental LayoutAnimations commit hook on views mounted before the hook was installed.RuntimeTestsRunner: the first library whose tests you run claims the JS session, and the other library's screen then shows a message asking to reload the app instead of the test selector. This is necessary because ReJest's suite registration is module-level (describeruns atrequiretime) and itsTestRunnersingleton accumulates suites for the whole session — running both libraries in one session would merge the registries and re-run the first library's tests inside the second run. The runner was already one-shot per session ("Reload the app to run the tests again"), so this extends the same semantics across the two screens. The guard only engages when arunnerIdprop is passed, so any otherRuntimeTestsRunnerusage is unaffected.Test plan
yarn type:check:nativeinapps/common-apppasses with zero errors.