mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-15 20:34:44 +00:00
allow reserved words as route names - fixes #315
This commit is contained in:
1
test/app/routes/const.html
Normal file
1
test/app/routes/const.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>reserved words are okay as routes</h1>
|
||||
@@ -14,6 +14,7 @@
|
||||
<a href='blog/throw-an-error'>error link</a>
|
||||
<a href='credentials?creds=include'>credentials</a>
|
||||
<a rel=prefetch class='{page === "blog" ? "selected" : ""}' href='blog'>blog</a>
|
||||
<a href="const">const</a>
|
||||
|
||||
<div class='hydrate-test'></div>
|
||||
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user