fix(router): add support for query params with mulitple values
closes #11373
This commit is contained in:

committed by
Victor Berchet

parent
03d9de33a1
commit
e4d5a5f003
@ -160,6 +160,11 @@ describe('url serializer', () => {
|
||||
expect(url.serialize(tree)).toEqual('/one?a=');
|
||||
});
|
||||
|
||||
it('should handle multiple query params of the same name into an array', () => {
|
||||
const tree = url.parse('/one?a=foo&a=bar&a=swaz');
|
||||
expect(tree.queryParams).toEqual({a: ['foo', 'bar', 'swaz']});
|
||||
});
|
||||
|
||||
it('should parse fragment', () => {
|
||||
const tree = url.parse('/one#two');
|
||||
expect(tree.fragment).toEqual('two');
|
||||
|
Reference in New Issue
Block a user