Files
docx-js/src/file/xml-components/xml-component.spec.ts

24 lines
610 B
TypeScript
Raw Normal View History

import { expect } from "chai";
2019-06-26 02:11:43 +01:00
import { Formatter } from "export/formatter";
import { XmlComponent } from "./";
2016-07-17 16:03:31 +01:00
2018-01-23 01:33:12 +00:00
class TestComponent extends XmlComponent {}
2016-07-17 16:03:31 +01:00
2016-07-17 16:18:20 +01:00
describe("XmlComponent", () => {
2016-07-17 16:03:31 +01:00
let xmlComponent: TestComponent;
beforeEach(() => {
xmlComponent = new TestComponent("w:test");
});
describe("#constructor()", () => {
it("should create an Xml Component which has the correct rootKey", () => {
2019-06-26 02:11:43 +01:00
const tree = new Formatter().format(xmlComponent);
expect(tree).to.deep.equal({
"w:test": {},
});
2016-07-17 16:03:31 +01:00
});
});
});