Skip to content

Commit 586fc59

Browse files
committed
Add test verifying multiple URL encoded characters are decoded successfully
1 parent 194b157 commit 586fc59

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/__tests__/getParams-test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ describe('getParams', function () {
102102
expect(getParams(pattern, '/users/123')).toBe(null);
103103
});
104104
});
105+
106+
describe('and the path contains multiple special URL encoded characters', function () {
107+
var pattern = '/foo/:component';
108+
109+
describe('and the path matches', function () {
110+
it('returns the correctly decoded characters', function () {
111+
expect(getParams(pattern, '/foo/%7Bfoo%24bar')).toEqual({ component: '{foo$bar' });
112+
});
113+
});
114+
});
105115
});
106116

107117
describe('when a pattern has a *', function () {

0 commit comments

Comments
 (0)