Repository navigation
test: make remendWorklet test a module to fix typecheck - #33
Merged
Merged
Conversation
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
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.
What
src/__tests__/remendWorklet.test.tshad no top-levelimport/export, so under tsconfig'sverbatimModuleSyntaxits top-levelconsts (mockPlatform,mockRemend,worklets) were treated as global script declarations andtscreportedTS2451redeclarations. This brokeyarn typecheck(exit 2) and the CI typecheck job. Addedexport {}to mark the file a module so its top-level bindings are module-scoped.Introduced by #31 (
b03746e); present onmain. The published artifact is unaffected (tests are excluded from the bob build), but CI onmainis red without this.Why now
Blocks a clean
0.3.0release — the publish workflow ships frommain, andmainshould be green first.Verification
yarn lint✅yarn typecheck✅ (was exit 2, now 0)yarn test✅ 6 passed, 1 todoyarn prepare(build) ✅Created with usage of AI tools