Simplify multiple addXXX methods into a single add method for Footer

This commit is contained in:
Dolan
2019-06-25 01:58:09 +01:00
parent 384d144a85
commit b566b0f765
5 changed files with 15 additions and 29 deletions

View File

@ -10,7 +10,7 @@ describe("HeaderWrapper", () => {
describe("#add", () => {
it("should call the underlying header's addChildElement for Paragraph", () => {
const wrapper = new HeaderWrapper(new Media(), 1);
const spy = sinon.spy(wrapper.Header, "addChildElement");
const spy = sinon.spy(wrapper.Header, "add");
wrapper.add(new Paragraph({}));
expect(spy.called).to.equal(true);
@ -18,7 +18,7 @@ describe("HeaderWrapper", () => {
it("should call the underlying header's addChildElement for Table", () => {
const wrapper = new HeaderWrapper(new Media(), 1);
const spy = sinon.spy(wrapper.Header, "addChildElement");
const spy = sinon.spy(wrapper.Header, "add");
wrapper.add(
new Table({
rows: 1,