Skip to content

Commit 9f03c25

Browse files
authored
merge changes from #824
1 parent d4546a2 commit 9f03c25

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/match.test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ describe('match', () => {
3939

4040
it('Rest param route "/:x+"', () => {
4141
const matchedResult = execPath('/user/foo', '/user/:id+');
42-
expect(matchedResult).toEqual({ path: '/user/foo', params: { id: 'foo' } });
42+
expect(matchedResult).toEqual({ path: '/user/foo', params: { id: 'foo' }, id: 'foo', query: {} });
4343

4444
const matchedResultWithSlash = execPath('/user/foo/bar', '/user/:id+');
45-
expect(matchedResultWithSlash).toEqual({ path: '/user/foo/bar', params: { id: 'foo/bar' }, id: 'foo/bar' });
45+
expect(matchedResultWithSlash).toEqual({
46+
path: '/user/foo/bar',
47+
params: { id: 'foo/bar' },
48+
id: 'foo/bar',
49+
query: {}
50+
});
4651

4752
const emptyResult = execPath('/user', '/user/:id+');
4853
expect(emptyResult).toEqual(undefined);
@@ -61,7 +66,7 @@ describe('match', () => {
6166
},
6267
seg1: '_SEGMENT1_',
6368
seg2: '_SEGMENT2_',
64-
query: {},
69+
query: {}
6570
});
6671
});
6772

0 commit comments

Comments
 (0)