Files
docx-js/ts/tests/docx/run/textRunTests.ts

20 lines
558 B
TypeScript
Raw Normal View History

import { expect } from "chai";
2017-03-09 22:56:08 +00:00
import { TextRun } from "../../../docx/run/text-run";
import { Formatter } from "../../../export/formatter";
2016-07-12 08:46:26 +01:00
describe("TextRun", () => {
let run: TextRun;
describe("#constructor()", () => {
it("should add text into run", () => {
run = new TextRun("test");
const f = new Formatter().format(run);
expect(f).to.deep.equal({"w:r": [
{"w:rPr": []},
{"w:t": [{_attr: {"xml:space": "preserve"}}, "test"]},
]});
2016-07-12 08:46:26 +01:00
});
});
2017-03-09 22:56:08 +00:00
});