Turn back on no-null-keyword. Use empty object instead of null to signal to the xml library that an empty element should be produced. Update the related tests.

Related to #306
This commit is contained in:
Bruce Duncan
2019-04-10 01:28:37 -04:00
parent 816cb54b14
commit bb1604cd8f
17 changed files with 72 additions and 71 deletions

View File

@ -1,4 +1,4 @@
import { assert } from "chai";
import { expect } from "chai";
import { Utility } from "tests/utility";
import { XmlComponent } from "./";
@ -15,7 +15,7 @@ describe("XmlComponent", () => {
describe("#constructor()", () => {
it("should create an Xml Component which has the correct rootKey", () => {
const newJson = Utility.jsonify(xmlComponent);
assert.equal(newJson.rootKey, "w:test");
expect(newJson.rootKey).to.equal("w:test");
});
});
@ -31,7 +31,7 @@ describe("XmlComponent", () => {
return;
}
assert.isNull(xml["w:test"]);
expect(xml["w:test"]).to.deep.equal({});
});
});
});