2017-03-07 22:15:53 +00:00
|
|
|
import { assert } from "chai";
|
2017-03-09 22:31:55 +00:00
|
|
|
import { ThematicBreak } from "../../../docx/paragraph/border";
|
|
|
|
import { Utility } from "../../utility";
|
2016-03-29 04:50:23 +01:00
|
|
|
|
|
|
|
describe("Border", () => {
|
2017-03-09 22:31:55 +00:00
|
|
|
// TODO: Need tests here
|
2016-03-29 04:50:23 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
describe("ThematicBreak", () => {
|
2016-05-26 15:08:34 +01:00
|
|
|
let thematicBreak: ThematicBreak;
|
2016-03-29 04:50:23 +01:00
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
thematicBreak = new ThematicBreak();
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("should create a Thematic Break with correct border properties", () => {
|
2017-03-09 22:31:55 +00:00
|
|
|
const newJson = Utility.jsonify(thematicBreak);
|
|
|
|
const attributes = {
|
2016-03-29 04:50:23 +01:00
|
|
|
color: "auto",
|
|
|
|
space: "1",
|
|
|
|
val: "single",
|
2017-03-09 22:31:55 +00:00
|
|
|
sz: "6",
|
2016-03-29 04:50:23 +01:00
|
|
|
};
|
2016-05-02 22:39:03 +01:00
|
|
|
assert.equal(JSON.stringify(newJson.root[0].root[0].root), JSON.stringify(attributes));
|
2016-03-29 04:50:23 +01:00
|
|
|
});
|
2016-05-26 15:08:34 +01:00
|
|
|
});
|
2017-03-09 22:31:55 +00:00
|
|
|
});
|