MCPcopy Index your code
hub / github.com/angular-ui/ui-router / compareUrlWithQuery

Function compareUrlWithQuery

test/angular/1.7/angular-mocks.js:2208–2217  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

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('&');

Callers 1

MockHttpExpectationFunction · 0.85

Calls 1

normalizeQueryFunction · 0.85

Tested by

no test coverage detected