allow reserved words as route names - fixes #315

This commit is contained in:
Rich Harris
2018-09-02 21:46:25 -04:00
parent 4a92fbbbfa
commit 2c507b5a2e
5 changed files with 67 additions and 3 deletions

View File

@@ -743,6 +743,14 @@ function run({ mode, basepath = '' }) {
assert.equal(title, 'root preload function ran: true');
});
});
it('allows reserved words as route names', () => {
return nightmare.goto(`${base}/const`).init()
.then(() => nightmare.page.title())
.then(title => {
assert.equal(title, 'reserved words are okay as routes');
});
});
});
describe('headers', () => {