Skip to content

test: make remendWorklet test a module to fix typecheck - #33

Merged
eszlamczyk merged 1 commit into
mainfrom
fix/typecheck-remend-worklet-test
Sep 4, 2026
Merged

eszlamczyk merged 1 commit into
mainfrom
fix/typecheck-remend-worklet-test

Conversation

@eszlamczyk

Copy link
Copy Markdown
Collaborator

What

src/__tests__/remendWorklet.test.ts had no top-level import/export, so under tsconfig's verbatimModuleSyntax its top-level consts (mockPlatform, mockRemend, worklets) were treated as global script declarations and tsc reported TS2451 redeclarations. This broke yarn typecheck (exit 2) and the CI typecheck job. Added export {} to mark the file a module so its top-level bindings are module-scoped.

Introduced by #31 (b03746e); present on main. The published artifact is unaffected (tests are excluded from the bob build), but CI on main is red without this.

Why now

Blocks a clean 0.3.0 release — the publish workflow ships from main, and main should be green first.

Verification

  • yarn lint ✅
  • yarn typecheck ✅ (was exit 2, now 0)
  • yarn test ✅ 6 passed, 1 todo
  • yarn prepare (build) ✅
  • Fresh RN 0.85.3 consumer project: installed the packed tarball + peer deps, iOS & Android Metro bundles compile with the full worklet pipeline ✅

Created with usage of AI tools

The test file had no top-level import/export, so under tsconfig's
verbatimModuleSyntax its top-level consts leaked into the global
script scope and tsc reported TS2451 redeclarations, breaking
`yarn typecheck` and the CI typecheck job. Add `export {}` to mark
it a module.

Created with usage of AI tools
@eszlamczyk
eszlamczyk merged commit 132ee7b into main Sep 4, 2026
3 checks passed
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