Skip to content

Commit

Permalink
Merge pull request #183 from notengrafik/pr/transposing-instruments
Browse files Browse the repository at this point in the history
Add test file for transposing instruments
  • Loading branch information
ahankinson authored Sep 10, 2021
2 parents ba82d50 + 3ae6860 commit dc77f49
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/mocha/test-transposing-instruments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use strict";

const assert = require('assert');
const xpath = require('fontoxpath');
const utils = require('./utils');

const mei = utils.getTestMeiDom('transposing-instruments.mei');

describe("scoreDef", function() {
const staffDefs = xpath.evaluateXPath("//*:staffDef", mei);
it("@trans.semi", function() {
assert.deepStrictEqual(staffDefs.map(s => s.getAttribute("trans.semi")), ["-2", "-7", null]);
});
it("@trans.diat", function() {
assert.deepStrictEqual(staffDefs.map(s => s.getAttribute("trans.diat")), ["-1", "-4", null]);
});
});

// TODO: The test file has an instrument change with changing transposition that
// is not exported properly
Binary file added test/sibmeiTestSibs/transposing-instruments.sib
Binary file not shown.

0 comments on commit dc77f49

Please sign in to comment.