2017-04-14 11:01:47 +02:00
|
|
|
import { expect } from "chai";
|
2017-09-17 00:00:41 +01:00
|
|
|
|
2018-10-26 01:04:07 +01:00
|
|
|
import { Formatter } from "export/formatter";
|
|
|
|
|
2017-09-17 00:00:41 +01:00
|
|
|
import { TextRun } from "./text-run";
|
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");
|
2017-04-14 11:01:47 +02:00
|
|
|
const f = new Formatter().format(run);
|
2018-01-23 01:33:12 +00:00
|
|
|
expect(f).to.deep.equal({
|
2019-04-09 05:27:18 -04:00
|
|
|
"w:r": [{ "w:t": [{ _attr: { "xml:space": "preserve" } }, "test"] }],
|
2018-01-23 01:33:12 +00:00
|
|
|
});
|
2016-07-12 08:46:26 +01:00
|
|
|
});
|
|
|
|
});
|
2017-03-09 22:56:08 +00:00
|
|
|
});
|