Work on new table API

This commit is contained in:
Dolan
2019-03-13 02:29:11 +00:00
parent f3ba11b21c
commit 2cb7d44a77
10 changed files with 91 additions and 30 deletions

View File

@ -93,7 +93,12 @@ describe("File", () => {
it("should call the underlying document's addTable", () => {
const wrapper = new File();
const spy = sinon.spy(wrapper.Document, "addTable");
wrapper.addTable(new Table(1, 1));
wrapper.addTable(
new Table({
rows: 1,
columns: 1,
}),
);
expect(spy.called).to.equal(true);
});
@ -103,7 +108,10 @@ describe("File", () => {
it("should call the underlying document's createTable", () => {
const wrapper = new File();
const spy = sinon.spy(wrapper.Document, "createTable");
wrapper.createTable(1, 1);
wrapper.createTable({
rows: 1,
columns: 1,
});
expect(spy.called).to.equal(true);
});