mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 20:34:44 +00:00
add test for #77
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user