Explorar o código

test: fix Vexflow warning

sschmid %!s(int64=5) %!d(string=hai) anos
pai
achega
1b52fee707
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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();