Skip to content

Increase test coverage for js-export/interface.js and fix test harness for real constraints#5118

Closed
varruunnn wants to merge 2 commits intosugarlabs:masterfrom
varruunnn:interface
Closed

Increase test coverage for js-export/interface.js and fix test harness for real constraints#5118
varruunnn wants to merge 2 commits intosugarlabs:masterfrom
varruunnn:interface

Conversation

@varruunnn
Copy link
Copy Markdown
Contributor

This PR adds comprehensive Jest coverage for js/js-export/interface.js, raising coverage from near 15% to 90%+ by exercising real block-to-JS argument validation logic.
Key changes:
Loads constraints.js against the real JSInterface in tests (via global.JSInterface) so _methodArgConstraints and overload rules are available, matching the browser runtime.
Removes the previous test override that wiped constraint data and prevented validateArgs() from executing real logic.
Adds tests covering coercion, clamping, solfege/letter parsing, accidentals, noise/synth/drum enums, async function validation, and overloaded signatures.
CLOSES #5115
n

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@omsuneri omsuneri self-requested a review January 10, 2026 17:52
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been open for more than 60 days without any activity. It will be closed in 3 days unless the stale label is removed or commented on.

@github-actions github-actions Bot added the Stale label Mar 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Closed pull request due to inactivity for more than 63 days.

@github-actions github-actions Bot closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

js-export/interface.js lacks tests for core block-to-JS conversions

1 participant