Files
docx-js/ts/tests/docx/run/textRunTests.ts
2017-03-07 22:15:53 +00:00

20 lines
504 B
TypeScript

import { TextRun } from "../../../docx/run/text-run";
import { assert } from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
describe("TextRun", () => {
let run: TextRun;
describe("#constructor()", () => {
it("should add text into run", () => {
run = new TextRun("test");
let newJson = jsonify(run);
assert.equal(newJson.root[1].root, "test");
});
});
});