|
@@ -9,7 +9,7 @@ describe("Measure Size Calculator Tests", () => {
|
|
|
let stave: Vex.Flow.Stave = new Vex.Flow.Stave(0, 0, 0);
|
|
|
let voices: Vex.Flow.Voice[];
|
|
|
//let formatter: Vex.Flow.Formatter = new Vex.Flow.Formatter();
|
|
|
- let formatter: any;
|
|
|
+ let formatter: Vex.Flow.Formatter;
|
|
|
// Create a voice with a note
|
|
|
let voice: Vex.Flow.Voice;
|
|
|
let note: Vex.Flow.StaveNote;
|
|
@@ -24,9 +24,8 @@ describe("Measure Size Calculator Tests", () => {
|
|
|
|
|
|
chai.expect(formatter.preCalculateMinTotalWidth(voices)).to.equal(22);
|
|
|
|
|
|
- calc = new MeasureSizeCalculator(
|
|
|
- stave, voices, <Vex.Flow.Formatter> formatter
|
|
|
- );
|
|
|
+ calc = new MeasureSizeCalculator(stave, voices, formatter);
|
|
|
+
|
|
|
chai.expect(calc.getBottomBorder()).to.equal(5);
|
|
|
done();
|
|
|
});
|
|
@@ -43,9 +42,8 @@ describe("Measure Size Calculator Tests", () => {
|
|
|
voices = [voice];
|
|
|
|
|
|
chai.expect(formatter.preCalculateMinTotalWidth(voices)).to.equal(64);
|
|
|
- calc = new MeasureSizeCalculator(
|
|
|
- stave, voices, <Vex.Flow.Formatter> formatter
|
|
|
- );
|
|
|
+ calc = new MeasureSizeCalculator(stave, voices, formatter);
|
|
|
+
|
|
|
chai.expect(calc.getWidth()).to.equal(64);
|
|
|
chai.expect(calc.getBottomBorder()).to.equal(6);
|
|
|
chai.expect(calc.getTopBorder()).to.equal(0);
|