MCPcopy Index your code
hub / github.com/angular-app/angular-app / testMapUrl

Function testMapUrl

server/test/mongo-proxy.js:7–21  ·  view source on GitHub ↗
(test, request, expected, message)

Source from the content-addressed store, hash-verified

5var proxy;
6
7var testMapUrl = function(test, request, expected, message) {
8 var actual = proxy.mapUrl(request);
9 expected = url.parse(expected, true);
10
11 test.equal(actual.protocol, expected.protocol);
12 test.equal(actual.hostname, expected.hostname);
13
14 // To test the path we need to parse again to account for order differences in query
15 var actualPath = url.parse(actual.path, true);
16 var expectedPath = url.parse(expected.path, true);
17 test.deepEqual(actualPath.pathname, expectedPath.pathname);
18 test.deepEqual(actualPath.query, expectedPath.query);
19
20 test.done();
21};
22
23// Mock up the https service
24mongoProxyFactory.__set__('https', {

Callers 1

mongo-proxy.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected