diff --git a/test/common/test.js b/test/common/test.js index 6b49171..cb03c44 100644 --- a/test/common/test.js +++ b/test/common/test.js @@ -295,6 +295,18 @@ function run(env) { assert.equal(html, `URL is /show-url`); }); }); + + it('calls a delete handler', () => { + return nightmare + .goto(`${base}/delete-test`) + .wait(() => window.READY) + .click('.del') + .wait(() => window.deleted) + .evaluate(() => window.deleted.id) + .then(id => { + assert.equal(id, 42); + }); + }); }); describe('headers', () => {