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

25 lines
576 B
TypeScript
Raw Normal View History

import { assert } from "chai";
import { Utility } from "../../tests/utility";
import { XmlComponent } from "./";
2016-07-17 16:03:31 +01:00
class TestComponent extends XmlComponent {
}
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", () => {
2017-03-09 22:56:08 +00:00
const newJson = Utility.jsonify(xmlComponent);
2016-07-17 16:03:31 +01:00
assert.equal(newJson.rootKey, "w:test");
});
});
});