add test for #77

This commit is contained in:
Rich Harris
2018-01-13 23:29:16 -05:00
parent 81b5e0d764
commit e3c047831a
3 changed files with 37 additions and 0 deletions

View File

@@ -289,6 +289,19 @@ function run(env) {
assert.equal(html, `URL is /show-url`);
});
it('calls a delete handler', async () => {
await nightmare
.goto(`${base}/delete-test`)
.wait(() => window.READY)
.click('.del')
.wait(() => window.deleted);
assert.equal(
await nightmare.evaluate(() => window.deleted.id),
42
);
});
});
describe('headers', () => {