(url)
| 2206 | }; |
| 2207 | |
| 2208 | function compareUrlWithQuery(url) { |
| 2209 | var urlWithQueryRe = /^([^?]*)\?(.*)$/; |
| 2210 | |
| 2211 | var expectedMatch = urlWithQueryRe.exec(expectedUrl); |
| 2212 | var actualMatch = urlWithQueryRe.exec(url); |
| 2213 | |
| 2214 | return !!(expectedMatch && actualMatch) && |
| 2215 | (expectedMatch[1] === actualMatch[1]) && |
| 2216 | (normalizeQuery(expectedMatch[2]) === normalizeQuery(actualMatch[2])); |
| 2217 | } |
| 2218 | |
| 2219 | function normalizeQuery(queryStr) { |
| 2220 | return queryStr.split('&').sort().join('&'); |
no test coverage detected