break tests
This commit is contained in:
22
ts/tests/docx/run/breakTests.ts
Normal file
22
ts/tests/docx/run/breakTests.ts
Normal 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");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user