Browse Source

test: fix Vexflow warning

sschmid 5 years ago
parent
commit
1b52fee707
1 changed files with 5 additions and 1 deletions
  1. 5 1
      test/Common/OSMD/OSMD_Test.ts

+ 5 - 1
test/Common/OSMD/OSMD_Test.ts

@@ -359,8 +359,12 @@ describe("OpenSheetMusicDisplay Main Export", () => {
                     voiceEntry,
                     voiceEntry.ParentSourceStaffEntry,
                     new Fraction(1),
-                    new Pitch(11, 1, AccidentalEnum.NATURAL));
+                    new Pitch(11, 2, AccidentalEnum.NATURAL));
+                    // note: if the pitch is such that the voice entry frequencies aren't ordered correctly,
+                    // Vexflow will complain about unsorted pitches. see below
                 voiceEntry.Notes.push(newNote);
+                // we could do something like voiceEntry.sort() here to prevent the Vexflow warning about unsorted pitches,
+                // but for now sort() only exists on GraphicalVoiceEntry.
 
                 opensheetmusicdisplay.updateGraphic();