remove from API delete()/IsDeleted(), and deleted check from prepForXml; not useful in declarative style API
This commit is contained in:
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user