Skip to content

Commit

Permalink
Merge pull request #115 from jpmorganchase/test-deletions
Browse files Browse the repository at this point in the history
Added tests to verify deletions cause no errors
  • Loading branch information
texodus authored May 18, 2018
2 parents c21c50d + 2155dcc commit 72cffc9
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion packages/perspective/test/js/constructors.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,36 @@ module.exports = (perspective) => {
]);
});

});
});


describe("Destructors", function() {

it("calls delete() on table with no views", async function () {
let table = perspective.table(data);
await table.delete();
expect(true).toEqual(true);
});

it("calls delete on a view, then a table", async function () {
var table = perspective.table(data);
var view = table.view();
await view.delete();
await table.delete();
expect(true).toEqual(true);
});

it("calls delete on multiple views, then a table", async function () {
var table = perspective.table(data);
var view1 = table.view();
var view2 = table.view();
await view1.delete();
await view2.delete();
await table.delete();
expect(true).toEqual(true);
});

});

describe("Constructors", function() {

Expand Down

0 comments on commit 72cffc9

Please sign in to comment.