break tests

This commit is contained in:
Dolan Miu
2016-07-18 18:49:11 +01:00
parent 81e7d01556
commit d23583f9b5

View File

@ -0,0 +1,22 @@
import {Break} from "../../../docx/run/break";
import {assert} from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe.only("Break", () => {
let currentBreak: Break;
beforeEach(() => {
currentBreak = new Break();
});
describe("#constructor()", () => {
it("should create a Break with correct root key", () => {
let newJson = jsonify(currentBreak);
assert.equal(newJson.rootKey, "w:br");
});
});
});