2017-03-07 22:15:53 +00:00
|
|
|
import { assert } from "chai";
|
2017-03-09 22:31:55 +00:00
|
|
|
import { Style } from "../../../docx/paragraph/style";
|
|
|
|
import { Utility } from "../../utility";
|
2016-03-30 02:55:11 +01:00
|
|
|
|
2016-04-09 04:53:42 +01:00
|
|
|
describe("ParagraphStyle", () => {
|
2016-05-26 15:08:34 +01:00
|
|
|
let style: Style;
|
2016-03-30 02:55:11 +01:00
|
|
|
|
|
|
|
describe("#constructor()", () => {
|
|
|
|
it("should create a style with given value", () => {
|
|
|
|
style = new Style("test");
|
2017-03-09 22:31:55 +00:00
|
|
|
const newJson = Utility.jsonify(style);
|
2016-05-01 22:24:20 +01:00
|
|
|
assert.equal(newJson.root[0].root.val, "test");
|
2016-03-30 02:55:11 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
it("should create a style with blank val", () => {
|
|
|
|
style = new Style("");
|
2017-03-09 22:31:55 +00:00
|
|
|
const newJson = Utility.jsonify(style);
|
2016-05-01 22:24:20 +01:00
|
|
|
assert.equal(newJson.root[0].root.val, "");
|
2016-03-30 02:55:11 +01:00
|
|
|
});
|
|
|
|
});
|
2017-03-09 22:31:55 +00:00
|
|
|
});
|