cuthbertLab / music21j

Javascript port of music21 -- Toolkit for Computational Musicology
Other
143 stars 41 forks source link

Improve Testing on music21j #197

Closed mscuthbert closed 1 year ago

mscuthbert commented 1 year ago

Rewrites to the testing system in music21j:

(1) grunt test is WAY faster and generates a test first time, NOT after the first change. After making any change only the parts of the system that have changed have been recompiled.

(2) Errors in tests are reported with file name and line numbers. Right now the line numbers seem to be off by 1-4 lines, but it's still WAY better than before.

(3) On the web-based tests/index.html system, the appended interactive streams work again and are grouped with the tests that generated them.

OTHER CHANGES:

Fix/Strictness on stream structure: If you were using ties with Parts/Measures/Voices, then there was a problem before where music21's Vexflow renderer would think that you had a Score instead. Now this is accurately realized as a Part.show() equivalent and works properly. If you were, however, using Parts with Voices but no measures, it doesn't work as well.

Lot less JQuery -- that was the original intent of this PR, but it sort of drifted. miditools removes its use completely.

defaults.appendLocation = querySelector -- set the default to not append to document.body but someplace else if needed.

Fixes to a test that was failing (but only graphically failing so wasn't noticed)

This PR begins with a purposely failing test to make sure that the CI is still working