|
Ran
|
Files
1
|
Run time
0s
|
Badge
README BADGES
|
travis-ci
<a href="https://github.com/yahoo/routr/commit/<a class=hub.com/yahoo/routr/commit/edd379d0c9696598cde9792d242154d59965e84a">edd379d0c<a href="https://github.com/yahoo/routr/commit/edd379d0c9696598cde9792d242154d59965e84a">">Fix encoding/decoding inconsistency when using values that need scaping Since `makePath` uses pathToRegexp which in place uses encodeURIComponent for all values, when getRoute tries to match a URL generated by the router itself, it returns a double enconded value. I suspect this is the root cause for fluxible-router to avoid using parsed URLs and [bookeeping the origURL instead](1) I added tests to both `match` (indirectly through `getRoute`) and to `makePath`. Notice that if you comment or remove `decodeURIComponent` from the implementation, only 1 of the tests fails. This proves the undesired inconsistency. [1]: https://github.com/yahoo/fluxible/blob/</a><a class="double-link" href="https://github.com/yahoo/routr/commit/<a class="double-link" href="https://github.com/yahoo/routr/commit/2be37f6df6ef5d5ed7c31fae5ec14843f924b213">2be37f6df</a>">2be37f6df</a><a href="https://github.com/yahoo/routr/commit/edd379d0c9696598cde9792d242154d59965e84a">/packages/fluxible-router/lib/History.js#L66-L73
114 of 114 relevant lines covered (100.0%)
115.18 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|