omit trailing slash from server route matchers - fixes #390

This commit is contained in:
Rich Harris
2018-08-30 18:48:10 -04:00
parent 1e22031765
commit bc31c73c33
2 changed files with 7 additions and 7 deletions

View File

@@ -53,14 +53,14 @@ describe('create_routes', () => {
assert.deepEqual(server_routes, [
{
name: 'route_blog_json',
pattern: /^\/blog.json\/?$/,
pattern: /^\/blog.json$/,
file: 'blog/index.json.js',
params: []
},
{
name: 'route_blog_$slug_json',
pattern: /^\/blog\/([^\/]+?).json\/?$/,
pattern: /^\/blog\/([^\/]+?).json$/,
file: 'blog/[slug].json.js',
params: ['slug']
}