Skip to content

Add extended unit tests for MusicBlocks.run behavior#5539

Open
badassscoder wants to merge 3 commits intosugarlabs:masterfrom
badassscoder:test/exportjs-pr5-deep
Open

Add extended unit tests for MusicBlocks.run behavior#5539
badassscoder wants to merge 3 commits intosugarlabs:masterfrom
badassscoder:test/exportjs-pr5-deep

Conversation

@badassscoder
Copy link
Contributor

Summary

This PR adds extended unit test coverage for the MusicBlocks.run method, ensuring correct execution flow, listener cleanup, and safe handling of edge cases.

Changes

  • Added comprehensive tests for MusicBlocks.run
  • Verified synth preparation and runtime state reset
  • Ensured all mice are executed correctly
  • Validated cleanup of turtle event listeners
  • Confirmed safe behavior with empty mouse lists and null stage references

Test Coverage

  • ✔️ Synth preparation via logo initialization
  • ✔️ Reset of firstNoteTime
  • ✔️ Execution of all active mice
  • ✔️ Proper removal of event listeners from turtles
  • ✔️ Graceful handling of empty and null runtime states

Scope

  • Tests only
  • No production code changes

Verification

  • All existing and new tests pass successfully

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

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

@badassscoder
Copy link
Contributor Author

badassscoder commented Feb 5, 2026

@walterbender this test is ready could you please review it

@walterbender
Copy link
Member

please address the conflict

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

@badassscoder
Copy link
Contributor Author

@walterbender can you please review it

@walterbender
Copy link
Member

another conflict :(

@badassscoder
Copy link
Contributor Author

@walterbender sorry for the bad commits i think there is something which i missed because of this is occuring i will make all the changes properly and then call out for review.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

@badassscoder
Copy link
Contributor Author

@walterbender could you please check the commit again

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.

2 participants