Skip to content

refactor: Split runtime tests into Reanimated and Worklets as a separate app-type#9928

Open
tjzel wants to merge 1 commit into
@tjzel/move-runtime-testsfrom
@tjzel/split-runtime-tests
Open

refactor: Split runtime tests into Reanimated and Worklets as a separate app-type#9928
tjzel wants to merge 1 commit into
@tjzel/move-runtime-testsfrom
@tjzel/split-runtime-tests

Conversation

@tjzel

@tjzel tjzel commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Note

This PR description was AI-generated.

Stacked on #9927. Part 2 of the runtime-tests spec.

Summary

I split the runtime tests between Reanimated tests and Worklets tests and made them a separate app-type in common-app, similar to how the Reanimated and CSS apps are structured.

  • I moved the test files into runtime-tests/reanimated/tests/ and runtime-tests/worklets/tests/ based on what each file actually imports: memory, runLoop, runtimes, and the worklets-only plugin tests (fileWorkletization, jsxInWorklets, versionMismatch) went to worklets/; animations, core, layoutAnimations, props, utilities, advancedAPI, StrictMode, the framework self-tests, and the plugin tests that use useSharedValue (contextObjects, workletClasses, recursion) went to reanimated/. Reanimated tests may freely use Worklets (Reanimated depends on it); Worklets tests import no Reanimated code.
  • I decomposed the monolithic suite list from RuntimeTestsExample.tsx into reanimated/suites.ts and worklets/suites.ts, preserving every suite's enabled/commented/disabled/skipByDefault state and the existing TODO comments verbatim. The shared RuntimeTestSuite type lives in runtime-tests/types.ts with no imports, so suite registries don't pull the test framework (or Reanimated) into the module graph at app boot — this matters for the upcoming CLI auto-run part of the spec.
  • I added a new Runtime Tests app-type (src/apps/runtime-tests/App.tsx) with a home screen that opens either the Reanimated or the Worklets test runner — one library at a time. It's registered in the drawer between CSS and Reanimated, and hidden on web (the old example entry had disabledPlatforms: [WEB]).
  • I removed the RuntimeTestsExample entry from the Reanimated examples registry and deleted the now-decomposed RuntimeTestsExample.tsx.
  • The ReJest framework itself still statically imports both libraries; isolating Worklets-only runs from Reanimated is deliberately left to the CLI-runner part of the spec.

Test plan

  • yarn type:check:native in apps/common-app passes with zero errors.
  • Manual: open the app → drawer → Runtime Tests → run Reanimated Tests and Worklets Tests separately (simulator verification to follow in the stacked manual-run PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant