Files
docx-js/ts/docx/paragraph/style.spec.ts

23 lines
661 B
TypeScript
Raw Normal View History

import { assert } from "chai";
import { Utility } from "../../tests/utility";
import { Style } from "./style";
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
});