Skip to content

test: cover remendWorklet web/native platform branch - #31

Merged
eszlamczyk merged 1 commit into
mainfrom
test/remend-worklet-web-path
Aug 20, 2026
Merged

eszlamczyk merged 1 commit into
mainfrom
test/remend-worklet-web-path

Conversation

@eszlamczyk

Copy link
Copy Markdown
Collaborator

Summary

Adds a regression test for the web crash fix (#28) — the first coverage of remendWorklet. #28 shipped without a test since the behavior is decided at module load; this locks it in.

What it covers

src/__tests__/remendWorklet.test.ts loads the module fresh per platform (via jest.isolateModules, since the web/native branch is chosen at import time) and asserts:

Notes

  • Platform and remend are mocked via stable refs the jest.mock factories close over, because jest.isolateModules re-requires those modules on every load.
  • remend is a virtual mock — its package.json exposes only an "import" condition, which jest's CommonJS resolver can't load, and the test only needs the stub.

Verification

@eszlamczyk
eszlamczyk merged commit b03746e into main Aug 20, 2026
3 checks passed
@eszlamczyk
eszlamczyk deleted the test/remend-worklet-web-path branch August 20, 2026 14:10
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