Remove jsonify method

This commit is contained in:
Dolan
2019-06-26 02:11:43 +01:00
parent 6c29c4fb1f
commit 564a055316
2 changed files with 142 additions and 45 deletions

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Utility } from "tests/utility";
import { Formatter } from "export/formatter";
import { EMPTY_OBJECT, XmlComponent } from "./";
class TestComponent extends XmlComponent {}
@ -14,8 +14,10 @@ describe("XmlComponent", () => {
describe("#constructor()", () => {
it("should create an Xml Component which has the correct rootKey", () => {
const newJson = Utility.jsonify(xmlComponent);
expect(newJson.rootKey).to.equal("w:test");
const tree = new Formatter().format(xmlComponent);
expect(tree).to.deep.equal({
"w:test": {},
});
});
});