Files
docx-js/ts/tests/docx/xml-components/xmlComponentTests.ts

24 lines
595 B
TypeScript
Raw Normal View History

import { assert } from "chai";
2017-03-09 22:56:08 +00:00
import { XmlComponent } from "../../../docx/xml-components";
import { Utility } from "../../utility";
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");
});
});
});