fix(router): use encodeUri/decodeUri to encode fragment

This commit is contained in:
vsavkin
2016-08-25 06:08:07 -07:00
committed by Victor Berchet
parent 0bb516fae2
commit bb9dfbc578
2 changed files with 5 additions and 6 deletions

View File

@ -207,10 +207,10 @@ describe('url serializer', () => {
});
it('should encode/decode fragment', () => {
const u = `/one#${encode("one two")}`;
const u = `/one#${encodeURI("one two=three four")}`;
const tree = url.parse(u);
expect(tree.fragment).toEqual('one two');
expect(tree.fragment).toEqual('one two=three four');
expect(url.serialize(tree)).toEqual(u);
});
});