mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-11 19:04:30 +00:00
dont serve error page for unhandled server route errors - fixes #138
This commit is contained in:
3
test/app/routes/throw-an-error.js
Normal file
3
test/app/routes/throw-an-error.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export function get() {
|
||||
throw new Error('nope');
|
||||
}
|
||||
@@ -391,6 +391,14 @@ function run(env) {
|
||||
JSON.parse(text);
|
||||
});
|
||||
});
|
||||
|
||||
it('does not serve error page for non-page errors', () => {
|
||||
return nightmare.goto(`${base}/throw-an-error`)
|
||||
.page.text()
|
||||
.then(text => {
|
||||
assert.equal(text, 'nope');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('headers', () => {
|
||||
|
||||
Reference in New Issue
Block a user