listing stuff

This commit is contained in:
Dolan
2017-03-09 22:31:55 +00:00
parent 0e8d92f8bb
commit 5fac776dca
9 changed files with 57 additions and 78 deletions

View File

@ -1,13 +1,9 @@
import { ThematicBreak } from "../../../docx/paragraph/border";
import { assert } from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
import { ThematicBreak } from "../../../docx/paragraph/border";
import { Utility } from "../../utility";
describe("Border", () => {
// TODO: Need tests here
});
describe("ThematicBreak", () => {
@ -19,14 +15,14 @@ describe("ThematicBreak", () => {
describe("#constructor()", () => {
it("should create a Thematic Break with correct border properties", () => {
let newJson = jsonify(thematicBreak);
let attributes = {
const newJson = Utility.jsonify(thematicBreak);
const attributes = {
color: "auto",
space: "1",
val: "single",
sz: "6"
sz: "6",
};
assert.equal(JSON.stringify(newJson.root[0].root[0].root), JSON.stringify(attributes));
});
});
});
});