Skip to content

test(react): move worklet runtime behavior tests under runtime#2420

Merged
Yradex merged 1 commit intolynx-family:mainfrom
Yradex:wt/move-mts-runtime-3-20260401
Apr 3, 2026
Merged

test(react): move worklet runtime behavior tests under runtime#2420
Yradex merged 1 commit intolynx-family:mainfrom
Yradex:wt/move-mts-runtime-3-20260401

Conversation

@Yradex
Copy link
Copy Markdown
Collaborator

@Yradex Yradex commented Apr 3, 2026

Summary by CodeRabbit

  • Tests

    • Updated test module import paths and test configuration for worklet-runtime modules.
  • Chores

    • Updated Vitest configuration for module resolution aliases and coverage settings.

Summary

  • move the worklet-runtime behavior tests under packages/react/runtime/__test__/worklet-runtime so their location matches ownership of runtime/src/worklet-runtime
  • keep packages/react/worklet-runtime focused on shell-level layout and export contract coverage by leaving only the package structure test there
  • update the runtime Vitest config to resolve worklet-runtime bindings from runtime source and to let runtime own coverage for the moved tests

Testing

  • pnpm exec vitest run packages/react/runtime/__test__/worklet-runtime --config packages/react/runtime/vitest.config.ts
  • pnpm exec vitest run packages/react/worklet-runtime/__test__/runtimeSourceLayout.test.js --config packages/react/worklet-runtime/vitest.config.ts

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 3, 2026

⚠️ No Changeset found

Latest commit: b4f5e89

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87d6b2a6-20c9-48db-9af3-917beff220bb

📥 Commits

Reviewing files that changed from the base of the PR and between e3c1156 and b4f5e89.

📒 Files selected for processing (13)
  • packages/react/runtime/__test__/worklet-runtime/api/element.test.js
  • packages/react/runtime/__test__/worklet-runtime/delayWorkletEvent.test.js
  • packages/react/runtime/__test__/worklet-runtime/eventPropagation.test.js
  • packages/react/runtime/__test__/worklet-runtime/jsFunctionLifecycle.test.js
  • packages/react/runtime/__test__/worklet-runtime/mainThreadFlushLoopGuard.test.js
  • packages/react/runtime/__test__/worklet-runtime/observers.test.js
  • packages/react/runtime/__test__/worklet-runtime/profile.test.js
  • packages/react/runtime/__test__/worklet-runtime/runOnBackground.test.js
  • packages/react/runtime/__test__/worklet-runtime/runOnMainThread.test.js
  • packages/react/runtime/__test__/worklet-runtime/workletRef.test.js
  • packages/react/runtime/__test__/worklet-runtime/workletRuntime.test.js
  • packages/react/runtime/vitest.config.ts
  • packages/react/worklet-runtime/vitest.config.ts
💤 Files with no reviewable changes (1)
  • packages/react/worklet-runtime/vitest.config.ts

📝 Walkthrough

Walkthrough

Test files in packages/react/runtime/__test__/worklet-runtime/ update import paths from ../../runtime/src/worklet-runtime/... to ../../src/worklet-runtime/.... Vitest configuration files adjust module resolution aliases and coverage exclusions to source locations. No test logic changes.

Changes

Cohort / File(s) Summary
Test Import Path Updates
packages/react/runtime/__test__/worklet-runtime/element.test.js, delayWorkletEvent.test.js, eventPropagation.test.js, jsFunctionLifecycle.test.js, mainThreadFlushLoopGuard.test.js, observers.test.js, profile.test.js, runOnBackground.test.js, runOnMainThread.test.js, workletRuntime.test.js
Updated module imports from ../../runtime/src/worklet-runtime/ to ../../src/worklet-runtime/ paths, no logic changes.
workletRef.test.js
packages/react/runtime/__test__/worklet-runtime/workletRef.test.js
Updated import paths and added globalThis.__DEV__ state manipulation in beforeEach/afterEach hooks for test isolation.
Vitest Configuration
packages/react/runtime/vitest.config.ts, packages/react/worklet-runtime/vitest.config.ts
Updated module resolution alias for worklet-runtime bindings to source entrypoint; refined coverage exclusions to specific paths; removed coverage configuration from worklet-runtime config.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

framework:React

Suggested reviewers

  • HuJean
  • hzy

Poem

🐰 Hopping through paths with a bounce and a bound,
We've shuffled imports all over the ground,
From runtime/src to just src we now go,
The worklet-runtime roots deeper below!
Config refined, exclusions precise,
Tests running cleaner—now that's quite nice! 🌿✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: moving worklet runtime behavior tests from packages/react/worklet-runtime to packages/react/runtime/test/worklet-runtime.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@Yradex Yradex marked this pull request as ready for review April 3, 2026 08:25
@Yradex Yradex requested review from HuJean and hzy as code owners April 3, 2026 08:25
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 3, 2026

Merging this PR will not alter performance

✅ 72 untouched benchmarks
⏩ 21 skipped benchmarks1


Comparing Yradex:wt/move-mts-runtime-3-20260401 (b4f5e89) with main (e3c1156)

Open in CodSpeed

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 3, 2026

Web Explorer

#8639 Bundle Size — 728.84KiB (0%).

b4f5e89(current) vs e2b33b7 main#8638(baseline)

Bundle metrics  Change 2 changes
                 Current
#8639
     Baseline
#8638
No change  Initial JS 43.31KiB 43.31KiB
No change  Initial CSS 2.16KiB 2.16KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 10 10
Change  Modules 148(-0.67%) 149
No change  Duplicate Modules 11 11
Change  Duplicate Code 34.7%(+0.03%) 34.69%
No change  Packages 3 3
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8639
     Baseline
#8638
No change  Other 384.62KiB 384.62KiB
No change  JS 342.07KiB 342.07KiB
No change  CSS 2.16KiB 2.16KiB

Bundle analysis reportBranch Yradex:wt/move-mts-runtime-3-202...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 3, 2026

React MTF Example

#197 Bundle Size — 207.38KiB (0%).

b4f5e89(current) vs e2b33b7 main#196(baseline)

Bundle metrics  no changes
                 Current
#197
     Baseline
#196
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 174 174
No change  Duplicate Modules 68 68
No change  Duplicate Code 46.08% 46.08%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#197
     Baseline
#196
No change  IMG 111.23KiB 111.23KiB
No change  Other 96.15KiB 96.15KiB

Bundle analysis reportBranch Yradex:wt/move-mts-runtime-3-202...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 3, 2026

React Example

#7064 Bundle Size — 237.81KiB (0%).

b4f5e89(current) vs e2b33b7 main#7063(baseline)

Bundle metrics  no changes
                 Current
#7064
     Baseline
#7063
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 180 180
No change  Duplicate Modules 71 71
No change  Duplicate Code 46.39% 46.39%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7064
     Baseline
#7063
No change  IMG 145.76KiB 145.76KiB
No change  Other 92.05KiB 92.05KiB

Bundle analysis reportBranch Yradex:wt/move-mts-runtime-3-202...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Apr 3, 2026

React External

#183 Bundle Size — 591.44KiB (0%).

b4f5e89(current) vs e2b33b7 main#182(baseline)

Bundle metrics  no changes
                 Current
#183
     Baseline
#182
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#183
     Baseline
#182
No change  Other 591.44KiB 591.44KiB

Bundle analysis reportBranch Yradex:wt/move-mts-runtime-3-202...Project dashboard


Generated by RelativeCIDocumentationReport issue

@Yradex Yradex merged commit d80a5cf into lynx-family:main Apr 3, 2026
78 of 80 checks passed
@Yradex Yradex deleted the wt/move-mts-runtime-3-20260401 branch April 3, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants