Files
docx-js/src/file/paragraph/run/run-components/text.spec.ts
Dolan Miu 982d923553 Improve import alias
@file/ and @export/ instead of file/ and export/ etc
2022-06-26 23:26:42 +01:00

18 lines
499 B
TypeScript

import { expect } from "chai";
import { Formatter } from "@export/formatter";
import { Text } from "./text";
describe("Text", () => {
describe("#constructor", () => {
it("adds the passed in text to the component", () => {
const t = new Text(" this is\n text");
const f = new Formatter().format(t);
expect(f).to.deep.equal({
"w:t": [{ _attr: { "xml:space": "preserve" } }, " this is\n text"],
});
});
});
});