execute error page hooks

This commit is contained in:
cudr
2019-04-06 02:32:11 +03:00
parent 7be7e1eb9f
commit 3a9d457389
6 changed files with 80 additions and 21 deletions

View File

@@ -112,6 +112,17 @@ describe('errors', function() {
);
});
it('execute error page hooks', async () => {
await page.goto(`${base}/some-throw-page`);
await start();
await wait(50);
assert.equal(
await page.$eval('h2', node => node.textContent),
'success'
);
})
it('does not serve error page for async non-page error', async () => {
await page.goto(`${base}/async-throw.json`);
@@ -134,4 +145,4 @@ describe('errors', function() {
await wait(50);
assert.equal(await title(), 'No error here');
});
});
});