Skip to content

test: add tests for js/widgets/sampler.js#5933

Open
Om-A-osc wants to merge 2 commits intosugarlabs:masterfrom
Om-A-osc:test/js-widgets-sampler.js
Open

test: add tests for js/widgets/sampler.js#5933
Om-A-osc wants to merge 2 commits intosugarlabs:masterfrom
Om-A-osc:test/js-widgets-sampler.js

Conversation

@Om-A-osc
Copy link
Contributor

Description

This PR adds comprehensive unit tests for js/widgets/sampler.js.

The new tests cover core functionality, state changes, and edge cases to ensure reliable widget behavior and prevent regressions.

Impact

  • Increases test coverage for sampler.js from 0% to 90%+
  • Improces reliability and maintainability of the sampler widget
  • Helps detect regressions in future changes

Changes

  • Added Jest test suite for sampler widget
  • Covered initialization, UI behavior, and playback logic
  • Included edge case and state transition tests

Testing

Run:

npx jest js/widgets/__tests__/sampler.test.js

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@Om-A-osc
Copy link
Contributor Author

Om-A-osc commented Mar 5, 2026

@omsuneri Would love a review on this

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