소스 검색

refactor tests: replace all occurences of MochaDone (deprecated) with Mocha.Done

sschmid 4 년 전
부모
커밋
d0b3712237

+ 3 - 3
test/Common/DataObjects/Fraction_Test.ts

@@ -7,13 +7,13 @@ describe("Fraction Unit Tests:", () => {
     describe("Construct Fraction, check properties", () => {
         const f1: Fraction = new Fraction(2, 6);
 
-        it("Numerator and Denominator", (done: MochaDone) => {
+        it("Numerator and Denominator", (done: Mocha.Done) => {
             chai.expect(f1.Numerator).to.equal(1);
             chai.expect(f1.Denominator).to.equal(3);
             done();
         });
 
-        it("Real value", (done: MochaDone) => {
+        it("Real value", (done: Mocha.Done) => {
             chai.expect(f1.RealValue).to.equal(1 / 3);
             done();
         });
@@ -24,7 +24,7 @@ describe("Fraction Unit Tests:", () => {
       const rand: () => number = function(): number {
         return Math.floor(Math.random() * 500) + 1;
       };
-      it("lt attribute", (done: MochaDone) => {
+      it("lt attribute", (done: Mocha.Done) => {
         for (let i: number = 0; i < 10; i += 1) {
           f1 = new Fraction(rand(), rand());
           f2 = new Fraction(rand(), rand());

+ 5 - 5
test/Common/DataObjects/Pitch_Test.ts

@@ -8,7 +8,7 @@ describe("Pitch Unit Tests:", () => {
         const higherTransposedFundamentalAndOctave: {halftone: number; overflow: number; } =
           Pitch.CalculateTransposedHalfTone(pitch, 26);
 
-        it("should be 1 octave higher and same fundamental", (done: MochaDone) => {
+        it("should be 1 octave higher and same fundamental", (done: Mocha.Done) => {
             chai.expect(transposedFundamentalAndOctave.overflow).to.equal(1);
             chai.expect(transposedFundamentalAndOctave.halftone).to.equal(pitch.FundamentalNote);
             chai.expect(higherTransposedFundamentalAndOctave.overflow).to.equal(2);
@@ -26,7 +26,7 @@ describe("Pitch Unit Tests:", () => {
         const frequency2: number = Pitch.calcFrequency(Pitch.calcFractionalKey(pitch2.Frequency));
         const frequency3: number = Pitch.calcFrequency(Pitch.calcFractionalKey(pitch3.Frequency));
 
-        it("should be 440Hz", (done: MochaDone) => {
+        it("should be 440Hz", (done: Mocha.Done) => {
             chai.expect(pitch1.Frequency).to.equal(440);
             chai.expect(pitch2.Frequency).to.equal(440);
             chai.expect(pitch3.Frequency).to.equal(440);
@@ -51,7 +51,7 @@ describe("Pitch Unit Tests:", () => {
         const key4: number = Pitch.calcFractionalKey(pitch4.Frequency);
         const key5: number = Pitch.calcFractionalKey(pitch5.Frequency);
 
-        it("pitch key should equal midi key", (done: MochaDone) => {
+        it("pitch key should equal midi key", (done: Mocha.Done) => {
             chai.expect(Math.round(key1)).to.equal(109);
             chai.expect(Math.round(key2)).to.equal(59);
             chai.expect(Math.round(key3)).to.equal(87);
@@ -80,7 +80,7 @@ describe("Pitch Unit Tests:", () => {
 
                 it( "calcedPitch equals original, " +
                     `note: ${pitch.FundamentalNote}, octave: ${pitch.Octave}, accidental; ${pitch.Accidental}`,
-                    (done: MochaDone) => {
+                    (done: Mocha.Done) => {
                         // compare the frequencies here -> only AccidentalEnum None and Sharp will lead to same note, octave and accidental
                         chai.expect(pitch.Frequency).to.equal(calcedPitch.Frequency);
                         done();
@@ -109,7 +109,7 @@ describe("Pitch Unit Tests:", () => {
 
                 it( "calcedPitch equals original, " +
                     `note: ${pitch.FundamentalNote}, octave: ${pitch.Octave}, accidental; ${pitch.Accidental}`,
-                    (done: MochaDone) => {
+                    (done: Mocha.Done) => {
                         chai.expect(pitch.getHalfTone()).to.equal(calcedPitch.getHalfTone());
                         done();
                     });

+ 3 - 3
test/Common/FileIO/Xml_Test.ts

@@ -44,7 +44,7 @@ describe("XML interface", () => {
 
     // Generates a test for a mxl file name
     function testFile(scoreName: string): void {
-        it(scoreName, (done: MochaDone) => {
+        it(scoreName, (done: Mocha.Done) => {
             // Load the xml file content
             const score: Document = TestUtils.getScore(scoreName);
             const div: HTMLElement = document.createElement("div");
@@ -55,7 +55,7 @@ describe("XML interface", () => {
         }).timeout(10000);
     }
 
-    it("test IXmlElement", (done: MochaDone) => {
+    it("test IXmlElement", (done: Mocha.Done) => {
         // Test name attribute
         chai.expect(documentElement.name).to.equal("score-partwise");
         // Test element method
@@ -68,7 +68,7 @@ describe("XML interface", () => {
         done();
     });
 
-    it("test IXmlAttribute", (done: MochaDone) => {
+    it("test IXmlAttribute", (done: Mocha.Done) => {
         // Test attributes method
         chai.expect(
             documentElement.element("credit").attributes()[0].name

+ 15 - 15
test/Common/OSMD/OSMD_Test.ts

@@ -7,14 +7,14 @@ import { VoiceEntry, Instrument, Note, Staff, Voice, GraphicalStaffEntry, Graphi
 describe("OpenSheetMusicDisplay Main Export", () => {
     let container1: HTMLElement;
 
-    it("no container", (done: MochaDone) => {
+    it("no container", (done: Mocha.Done) => {
         chai.expect(() => {
             return new OpenSheetMusicDisplay(undefined);
         }).to.throw(/container/);
         done();
     });
 
-    it("container", (done: MochaDone) => {
+    it("container", (done: Mocha.Done) => {
         const div: HTMLElement = TestUtils.getDivElement(document);
         chai.expect(() => {
             return new OpenSheetMusicDisplay(div);
@@ -83,7 +83,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
                             });
     });
 
-    it("load MXL from string", (done: MochaDone) => {
+    it("load MXL from string", (done: Mocha.Done) => {
         const mxl: string = TestUtils.getMXL("Mozart_Clarinet_Quintet_Excerpt.mxl");
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -96,7 +96,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("load invalid MXL from string", (done: MochaDone) => {
+    it("load invalid MXL from string", (done: Mocha.Done) => {
         const mxl: string = "\x50\x4b\x03\x04";
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -114,7 +114,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("load XML string", (done: MochaDone) => {
+    it("load XML string", (done: Mocha.Done) => {
         const score: Document = TestUtils.getScore("MuzioClementi_SonatinaOpus36No1_Part1.xml");
         const xml: string = new XMLSerializer().serializeToString(score);
         const div: HTMLElement = TestUtils.getDivElement(document);
@@ -128,7 +128,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("load XML Document", (done: MochaDone) => {
+    it("load XML Document", (done: Mocha.Done) => {
         const score: Document = TestUtils.getScore("MuzioClementi_SonatinaOpus36No1_Part1.xml");
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -141,7 +141,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it.skip("Timeout from server", (done: MochaDone) => {
+    it.skip("Timeout from server", (done: Mocha.Done) => {
         // TODO this test times out from time to time, even with osmd.loadUrlTimeout set to 5000.
         //   the test is unreliable, which makes it hard to test.
         //   also, it's better not to use OSMD to fetch one's score anyways.
@@ -159,7 +159,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("load MXL Document by URL", (done: MochaDone) => {
+    it("load MXL Document by URL", (done: Mocha.Done) => {
         const url: string = "base/test/data/Mozart_Clarinet_Quintet_Excerpt.mxl";
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -172,7 +172,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("load something invalid by URL", (done: MochaDone) => {
+    it("load something invalid by URL", (done: Mocha.Done) => {
         const url: string = "https://www.google.com";
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -190,7 +190,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     }).timeout(5000);
 
-    it("load invalid URL", (done: MochaDone) => {
+    it("load invalid URL", (done: Mocha.Done) => {
         const url: string = "https://www.afjkhfjkauu2ui3z2uiu.com";
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -208,7 +208,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     }).timeout(5000);
 
-    it("load invalid XML string", (done: MochaDone) => {
+    it("load invalid XML string", (done: Mocha.Done) => {
         const xml: string = "<?xml";
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -226,7 +226,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         );
     });
 
-    it("render without loading", (done: MochaDone) => {
+    it("render without loading", (done: Mocha.Done) => {
         const div: HTMLElement = TestUtils.getDivElement(document);
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
         chai.expect(() => {
@@ -244,7 +244,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         document.body.removeChild(container1);
     });
 
-    it("test width 500", (done: MochaDone) => {
+    it("test width 500", (done: Mocha.Done) => {
         const div: HTMLElement = container1;
         div.style.width = "500px";
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -259,7 +259,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
         ).catch(done);
     });
 
-    it("test width 200", (done: MochaDone) => {
+    it("test width 200", (done: Mocha.Done) => {
         const div: HTMLElement = container1;
         div.style.width = "200px";
         const opensheetmusicdisplay: OpenSheetMusicDisplay = TestUtils.createOpenSheetMusicDisplay(div);
@@ -300,7 +300,7 @@ describe("OpenSheetMusicDisplay Main Export", () => {
     });
     describe("cursor", () => {
         let opensheetmusicdisplay: OpenSheetMusicDisplay;
-        beforeEach((done: MochaDone) => {
+        beforeEach((done: Mocha.Done) => {
             const div: HTMLElement = container1;
             opensheetmusicdisplay = TestUtils.createOpenSheetMusicDisplay(div);
             const score: Document = TestUtils.getScore("MuzioClementi_SonatinaOpus36No1_Part1.xml");

+ 1 - 1
test/MusicalScore/Graphical/VexFlow/VexFlowConverter_Clef_Test.ts

@@ -12,7 +12,7 @@ describe("Clef Converter MusicXML to VexFlow", () => {
       parser = new DOMParser();
     });
 
-    it("reads treble key", (done: MochaDone) => {
+    it("reads treble key", (done: Mocha.Done) => {
       getMusicSheetWithClef("G").getStaffFromIndex(0);
       done();
     });

+ 3 - 3
test/MusicalScore/Graphical/VexFlow/VexFlowMeasure_Test.ts

@@ -13,7 +13,7 @@ import {EngravingRules} from "../../../../src/MusicalScore/Graphical/EngravingRu
 
 describe("VexFlow Measure", () => {
 
-   it("GraphicalMusicSheet", (done: MochaDone) => {
+   it("GraphicalMusicSheet", (done: Mocha.Done) => {
       const path: string = "MuzioClementi_SonatinaOpus36No1_Part1.xml";
       const score: Document = TestUtils.getScore(path);
       chai.expect(score).to.not.be.undefined;
@@ -28,7 +28,7 @@ describe("VexFlow Measure", () => {
       done();
    });
 
-   it("Simple Measure", (done: MochaDone) => {
+   it("Simple Measure", (done: Mocha.Done) => {
       const sheet: MusicSheet = new MusicSheet();
       sheet.Rules = new EngravingRules();
       const measure: SourceMeasure = new SourceMeasure(1, sheet.Rules);
@@ -43,7 +43,7 @@ describe("VexFlow Measure", () => {
       done();
    });
 
-   it("Empty Measure", (done: MochaDone) => {
+   it("Empty Measure", (done: Mocha.Done) => {
       const sheet: MusicSheet = new MusicSheet();
       sheet.Rules = new EngravingRules();
       const measure: SourceMeasure = new SourceMeasure(1, sheet.Rules);

+ 2 - 2
test/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetDrawer_Test.ts

@@ -11,7 +11,7 @@ import {CanvasVexFlowBackend} from "../../../../src/MusicalScore/Graphical/VexFl
 
 describe("VexFlow Music Sheet Drawer", () => {
 
-    it("draws sheet \"Clementi pt. 1\"", (done: MochaDone) => {
+    it("draws sheet \"Clementi pt. 1\"", (done: Mocha.Done) => {
         const score: Document = TestUtils.getScore("MuzioClementi_SonatinaOpus36No1_Part1.xml");
         chai.expect(score).to.not.be.undefined;
         const partwise: Element = TestUtils.getPartWiseElement(score);
@@ -33,7 +33,7 @@ describe("VexFlow Music Sheet Drawer", () => {
 
     // Test ignored for now, gms.calculateCursorLineAtTimestamp returns null instead of a GraphicalLine,
     // and in any case, this test doesn't test that the cursor is actually drawn, there are no expects for that etc.
-    // it.only("draws cursor (as rectangle)", (done: MochaDone) => {
+    // it.only("draws cursor (as rectangle)", (done: Mocha.Done) => {
     //     const score: Document = TestUtils.getScore("MuzioClementi_SonatinaOpus36No1_Part1.xml");
     //     chai.expect(score).to.not.be.undefined;
     //     const partwise: Element = TestUtils.getPartWiseElement(score);

+ 1 - 1
test/MusicalScore/ScoreCalculation/MusicSheetCalculator_Test.ts

@@ -16,7 +16,7 @@ describe("Music Sheet Calculator", () => {
     let score: IXmlElement;
     let sheet: MusicSheet;
 
-    it("calculates music sheet", (done: MochaDone) => {
+    it("calculates music sheet", (done: Mocha.Done) => {
         this.timeout = 10000;
         MusicSheetCalculator.TextMeasurer = new VexFlowTextMeasurer(new EngravingRules());
         // Load the XML file

+ 36 - 36
test/MusicalScore/ScoreIO/Key_Test.ts

@@ -20,14 +20,14 @@ describe("MusicXML parser for element 'key'", () => {
 
   describe("for group traditional keys", () => {
 
-    it("enforces single occurrence of element 'fifths'", (done: MochaDone) => {
+    it("enforces single occurrence of element 'fifths'", (done: Mocha.Done) => {
       const keyInstruction: KeyInstruction = getIllegalMusicXmlWithTwoFifthsElements().getFirstSourceMeasure().getKeyInstruction(0);
       // TODO Make sure we detect the multiple fifths and react properly // [it seems like we do this, test passes. ssch]
       chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.none);
       done();
     });
 
-    it("reads key signature with no optional 'mode' element present", (done: MochaDone) => {
+    it("reads key signature with no optional 'mode' element present", (done: Mocha.Done) => {
       const keyInstruction: KeyInstruction = getMusicSheetWithKey(0, undefined).getFirstSourceMeasure().getKeyInstruction(0);
       chai.expect(keyInstruction.Key).to.equal(0);
       chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.none);
@@ -36,112 +36,112 @@ describe("MusicXML parser for element 'key'", () => {
 
     describe("major keys", () => {
 
-      it("reads key signature C-major", (done: MochaDone) => {
+      it("reads key signature C-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(0, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(0);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature G-major", (done: MochaDone) => {
+      it("reads key signature G-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(1, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(1);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature D-major", (done: MochaDone) => {
+      it("reads key signature D-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(2, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(2);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature A-major", (done: MochaDone) => {
+      it("reads key signature A-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(3, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(3);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature E-major", (done: MochaDone) => {
+      it("reads key signature E-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(4, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(4);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature B-major", (done: MochaDone) => {
+      it("reads key signature B-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(5, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(5);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature F#-major", (done: MochaDone) => {
+      it("reads key signature F#-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(6, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(6);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature C#-major", (done: MochaDone) => {
+      it("reads key signature C#-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(7, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(7);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature G#-major", (done: MochaDone) => {
+      it("reads key signature G#-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(8, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(8);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature F-major", (done: MochaDone) => {
+      it("reads key signature F-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-1, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-1);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature B-major", (done: MochaDone) => {
+      it("reads key signature B-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-2, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-2);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature Eb-major", (done: MochaDone) => {
+      it("reads key signature Eb-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-3, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-3);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature Ab-major", (done: MochaDone) => {
+      it("reads key signature Ab-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-4, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-4);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature Db-major", (done: MochaDone) => {
+      it("reads key signature Db-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-5, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-5);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature Gb-major", (done: MochaDone) => {
+      it("reads key signature Gb-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-6, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-6);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
         done();
       });
 
-      it("reads key signature Fb-major", (done: MochaDone) => {
+      it("reads key signature Fb-major", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-8, "major").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-8);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.major);
@@ -151,105 +151,105 @@ describe("MusicXML parser for element 'key'", () => {
 
     describe("minor keys", () => {
 
-      it("reads key signature a-minor", (done: MochaDone) => {
+      it("reads key signature a-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(0, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(0);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature e-minor", (done: MochaDone) => {
+      it("reads key signature e-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(1, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(1);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature b-minor", (done: MochaDone) => {
+      it("reads key signature b-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(2, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(2);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature f#-minor", (done: MochaDone) => {
+      it("reads key signature f#-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(3, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(3);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature c#-minor", (done: MochaDone) => {
+      it("reads key signature c#-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(4, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(4);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature g#-minor", (done: MochaDone) => {
+      it("reads key signature g#-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(5, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(5);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature d#-minor", (done: MochaDone) => {
+      it("reads key signature d#-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(6, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(6);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature a#-minor", (done: MochaDone) => {
+      it("reads key signature a#-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(7, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(7);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature d-minor", (done: MochaDone) => {
+      it("reads key signature d-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-1, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-1);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature g-minor", (done: MochaDone) => {
+      it("reads key signature g-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-2, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-2);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature c-minor", (done: MochaDone) => {
+      it("reads key signature c-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-3, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-3);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature f-minor", (done: MochaDone) => {
+      it("reads key signature f-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-4, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-4);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature bb-minor", (done: MochaDone) => {
+      it("reads key signature bb-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-5, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-5);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature eb-minor", (done: MochaDone) => {
+      it("reads key signature eb-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-6, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-6);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
         done();
       });
 
-      it("reads key signature ab-minor", (done: MochaDone) => {
+      it("reads key signature ab-minor", (done: Mocha.Done) => {
         const keyInstruction: KeyInstruction = getMusicSheetWithKey(-7, "minor").getFirstSourceMeasure().getKeyInstruction(0);
         chai.expect(keyInstruction.Key).to.equal(-7);
         chai.expect(keyInstruction.Mode).to.equal(KeyModeEnum.minor);
@@ -265,7 +265,7 @@ describe("VexFlowConverter for element 'key'", () => {
     parser = new DOMParser();
   });
 
-  it("gives key signature G-major with no optional 'mode' element present", (done: MochaDone) => {
+  it("gives key signature G-major with no optional 'mode' element present", (done: Mocha.Done) => {
     const keyInstruction: KeyInstruction = getMusicSheetWithKey(1, "").getFirstSourceMeasure().getKeyInstruction(0);
     const vexflowKeySignature: string = VexFlowConverter.keySignature(keyInstruction);
     const isGMajorOrEminor: boolean = ["G", "E"].indexOf(vexflowKeySignature.charAt(0)) !== -1;
@@ -281,7 +281,7 @@ describe("InstrumentReader for element 'time'", () => {
     parser = new DOMParser();
   });
 
-  it("gives common time RythmSymbolEnum from xml", (done: MochaDone) => {
+  it("gives common time RythmSymbolEnum from xml", (done: Mocha.Done) => {
     const instructions: AbstractNotationInstruction[] =
       getMusicSheetWithKey(1, "major", "common").getFirstSourceMeasure().FirstInstructionsStaffEntries[0].Instructions;
     for (const instruction of instructions) {
@@ -292,7 +292,7 @@ describe("InstrumentReader for element 'time'", () => {
     done();
   });
 
-  it("gives alla breve/cut time RythmSymbolEnum from xml", (done: MochaDone) => {
+  it("gives alla breve/cut time RythmSymbolEnum from xml", (done: Mocha.Done) => {
     const instructions: AbstractNotationInstruction[] =
       getMusicSheetWithKey(1, "major", "cut").getFirstSourceMeasure().FirstInstructionsStaffEntries[0].Instructions;
     for (const instruction of instructions) {

+ 5 - 5
test/MusicalScore/ScoreIO/MusicSheetReader_Test.ts

@@ -22,22 +22,22 @@ describe("Music Sheet Reader", () => {
         sheet = reader.createMusicSheet(score, path);
     });
 
-    it("checks XML", (done: MochaDone) => {
+    it("checks XML", (done: Mocha.Done) => {
       done(); // TODO implement test
     });
 
-    it("reads title and composer", (done: MochaDone) => {
+    it("reads title and composer", (done: Mocha.Done) => {
         chai.expect(sheet.TitleString).to.equal("Sonatina Op.36 No 1 Teil 1 Allegro");
         chai.expect(sheet.ComposerString).to.equal("Muzio Clementi");
         done();
     });
 
-    it("reads measures", (done: MochaDone) => {
+    it("reads measures", (done: Mocha.Done) => {
         chai.expect(sheet.SourceMeasures.length).to.equal(38);
         done();
     });
 
-    it("reads instruments", (done: MochaDone) => {
+    it("reads instruments", (done: Mocha.Done) => {
         chai.expect(reader.CompleteNumberOfStaves).to.equal(2);
         chai.expect(sheet.Instruments.length).to.equal(2);
         chai.expect(sheet.InstrumentalGroups.length).to.equal(2);
@@ -46,7 +46,7 @@ describe("Music Sheet Reader", () => {
         done();
     });
 
-    it("reads notes", (done: MochaDone) => {
+    it("reads notes", (done: Mocha.Done) => {
         // TODO implement test
         // Staff Entries on first measure
         // chai.expect(sheet.SourceMeasures[0].VerticalSourceStaffEntryContainers[0].StaffEntries.length).to.equal(4);

+ 2 - 2
test/MusicalScore/VoiceData/NoteType_Test.ts

@@ -1,12 +1,12 @@
 import { NoteType, NoteTypeHandler } from "../../../src/MusicalScore/VoiceData/NoteType";
 
 describe("NoteType", () => {
-    it("parses 32nd note correctly (sample value)", (done: MochaDone) => {
+    it("parses 32nd note correctly (sample value)", (done: Mocha.Done) => {
         chai.expect(NoteTypeHandler.StringToNoteType("32nd")).to.equal(NoteType._32nd);
         done();
     });
 
-    it("parses all NoteType values from string correctly (in XML: <note><type>)", (done: MochaDone) => {
+    it("parses all NoteType values from string correctly (in XML: <note><type>)", (done: Mocha.Done) => {
         const inputValues: string[] = NoteTypeHandler.NoteTypeXmlValues;
         for (let i: number = 0; i < inputValues.length; i++) {
             chai.expect(NoteTypeHandler.StringToNoteType(inputValues[i])).to.equal(i);

+ 1 - 1
test/Util/DiffImages_Test_Experimental.ts

@@ -33,7 +33,7 @@ describe("GeneratePNGImages", () => {
     // TODO This is just example code for now.
     // generate PNG. TODO fs doesn't work with Karma. This is the big problem that needs to be worked around with ts/Karma.
     function generatePNG(sampleFilename: string): void {
-        it(sampleFilename, (done: MochaDone) => {
+        it(sampleFilename, (done: Mocha.Done) => {
             // Load the xml file content
             const score: Document = TestUtils.getScore(sampleFilename);
             const div: HTMLElement = document.createElement("div");