error on 4xx.html and 5xx.html

This commit is contained in:
Rich Harris
2018-06-28 12:57:59 -04:00
parent 9611656b76
commit 5b5f33d3cf
2 changed files with 20 additions and 0 deletions

View File

@@ -280,4 +280,20 @@ describe('create_routes', () => {
});
}, /Invalid route \[foo\]\[bar\]\.js — parameters must be separated/);
});
it('errors on 4xx.html', () => {
assert.throws(() => {
create_routes({
files: ['4xx.html']
});
}, /As of Sapper 0.14, 4xx.html and 5xx.html should be replaced with _error.html/);
});
it('errors on 5xx.html', () => {
assert.throws(() => {
create_routes({
files: ['5xx.html']
});
}, /As of Sapper 0.14, 4xx.html and 5xx.html should be replaced with _error.html/);
});
});