Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Mar 4, 2024
1 parent 2b9e208 commit 643f886
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion javascript/JZZ.midi.SMF.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/* istanbul ignore next */
if (JZZ.MIDI.SMF) return;

var _ver = '1.8.8';
var _ver = '1.8.9';

var _now = JZZ.lib.now;
function _error(s) { throw new Error(s); }
Expand Down
2 changes: 1 addition & 1 deletion minified/JZZ.midi.SMF.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jzz-midi-smf",
"version": "1.8.8",
"version": "1.8.9",
"description": "Standard MIDI Files: read / write / play (MIDI 1.0 and MIDI 2.0)",
"main": "javascript/JZZ.midi.SMF.js",
"scripts": {
Expand Down
14 changes: 14 additions & 0 deletions test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,20 @@ describe('SMF2', function() {
val = clip.validate();
assert.equal(val[0].toString(), 'offset 100 tick 96 -- Missing series start (d0d00200 20746578 74000000 00000000 -- Text)');
assert.equal(val[3].toString(), 'offset 140 tick 96 -- Missing series end (d0500200 74657874 20746578 74207465 -- Text)');
a = JZZ.UMP.umpData(0, 'data data data');
clip = new JZZ.MIDI.Clip();
clip.send(a[1]).send(a[0]);
clip = new JZZ.MIDI.Clip(clip.dump());
val = clip.validate();
assert.equal(val[0].toString(), 'offset 40 tick 0 -- Missing series start (50310061 00000000 00000000 00000000 -- Data)');
assert.equal(val[1].toString(), 'offset 60 tick 0 -- Missing series end (501d0064 61746120 64617461 20646174 -- Data)');
a = JZZ.UMP.sxMidiSoft(0, 4, 'karaoke');
clip = new JZZ.MIDI.Clip();
clip.send(a[1]).send(a[0]);
clip = new JZZ.MIDI.Clip(clip.dump());
val = clip.validate();
assert.equal(val[0].toString(), 'offset 40 tick 0 -- Missing series start (30366172 616f6b65 -- SysEx)');
assert.equal(val[1].toString(), 'offset 52 tick 0 -- Missing series end (30160020 2400046b -- SysEx)');
});
it('tick', function() {
var clip = new JZZ.MIDI.Clip();
Expand Down

0 comments on commit 643f886

Please sign in to comment.