Merge branch 'master' into collision

This commit is contained in:
Rich Harris
2018-05-03 21:44:28 -04:00
committed by GitHub
6 changed files with 37 additions and 8 deletions

View File

@@ -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\/?$/
]
);
});