This commit is contained in:
Dolan
2017-03-09 22:56:08 +00:00
parent 5fac776dca
commit 7022b39d2e
21 changed files with 138 additions and 181 deletions

View File

@ -1,10 +1,6 @@
import { XmlComponent } from "../../../docx/xml-components";
import { assert } from "chai";
function jsonify(obj: Object) {
let stringifiedJson = JSON.stringify(obj);
return JSON.parse(stringifiedJson);
}
import { XmlComponent } from "../../../docx/xml-components";
import { Utility } from "../../utility";
class TestComponent extends XmlComponent {
@ -20,7 +16,7 @@ describe("XmlComponent", () => {
describe("#constructor()", () => {
it("should create an Xml Component which has the correct rootKey", () => {
let newJson = jsonify(xmlComponent);
const newJson = Utility.jsonify(xmlComponent);
assert.equal(newJson.rootKey, "w:test");
});
});