mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-11 19:04:30 +00:00
Merge branch 'master' into collision
This commit is contained in:
@@ -20,6 +20,25 @@ describe('create_routes', () => {
|
||||
file: 'foo.html'
|
||||
}
|
||||
]
|
||||
]
|
||||
)
|
||||
});
|
||||
|
||||
it('encodes caharcters not allowed in path', () => {
|
||||
const routes = create_routes({
|
||||
files: [
|
||||
'"',
|
||||
'#',
|
||||
'?'
|
||||
]
|
||||
});
|
||||
|
||||
assert.deepEqual(
|
||||
routes.map(r => r.pattern),
|
||||
[
|
||||
/^\/%22\/?$/,
|
||||
/^\/%23\/?$/,
|
||||
/^\/%3F\/?$/
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user