Skip to content

Commit

Permalink
PR #609 test added
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed May 7, 2021
1 parent b30d1a4 commit 8efec9e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/barline_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ VF.Test.Barline = (function () {

ok(true, 'Simple Test');
});
run('Style BarNotes', function (options) {
var vf = VF.Test.makeFactory(options, 380, 160);
var stave = vf.Stave();

var notes = [
vf.StaveNote({ keys: ['d/4', 'e/4', 'f/4'], stem_direction: -1, duration: '2' }),
vf.BarNote({ type: 'single' }),
vf
.StaveNote({ keys: ['c/4', 'f/4', 'a/4'], stem_direction: -1, duration: '2' })
.addAccidental(0, vf.Accidental({ type: 'n' }))
.addAccidental(1, vf.Accidental({ type: '#' })),
];
notes[1].setStyle({ shadowBlur: 15, shadowColor: 'blue', fillStyle: 'blue', strokeStyle: 'blue' });

var voice = vf.Voice().addTickables(notes);

vf.Formatter().joinVoices([voice]).formatToStave([voice], stave);

vf.draw();

ok(true, 'Style');
});
},
};
})();

0 comments on commit 8efec9e

Please sign in to comment.