remove from API delete()/IsDeleted(), and deleted check from prepForXml; not useful in declarative style API

This commit is contained in:
Tom Hunkapiller
2021-05-22 03:19:06 +03:00
parent 37d099b457
commit ff14fcae3a
5 changed files with 7 additions and 75 deletions

View File

@ -1,8 +1,7 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { EMPTY_OBJECT, XmlComponent } from "./";
import { IContext } from "./base";
import { XmlComponent } from "./";
class TestComponent extends XmlComponent {}
@ -21,21 +20,4 @@ describe("XmlComponent", () => {
});
});
});
describe("#prepForXml()", () => {
it("should skip deleted elements", () => {
const child = new TestComponent("w:test1");
child.delete();
xmlComponent.addChildElement(child);
// tslint:disable-next-line: no-object-literal-type-assertion
const xml = xmlComponent.prepForXml({} as IContext);
if (!xml) {
return;
}
expect(xml["w:test"]).to.deep.equal(EMPTY_OBJECT);
});
});
});