Skip to content

Commit c39ba3b

Browse files
committed
Merge pull request parse-community#1102 from ParsePlatform/flovilmart.vendorCoverage
Ignores uncovered mongodbURL
2 parents 8b7779a + 13a33a9 commit c39ba3b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"flow-bin": "^0.22.0",
5858
"gaze": "^0.5.2",
5959
"jasmine": "^2.3.2",
60-
"mongodb-runner": "^3.1.15",
60+
"mongodb-runner": "3.1.15",
6161
"nodemon": "^1.8.1"
6262
},
6363
"scripts": {

src/vendor/mongodbUrl.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const slashedProtocol = {
6666
};
6767
const querystring = require('querystring');
6868

69+
/* istanbul ignore next: improve coverage */
6970
function urlParse(url, parseQueryString, slashesDenoteHost) {
7071
if (url instanceof Url) return url;
7172

@@ -74,6 +75,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) {
7475
return u;
7576
}
7677

78+
/* istanbul ignore next: improve coverage */
7779
Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
7880
if (typeof url !== 'string') {
7981
throw new TypeError('Parameter "url" must be a string, not ' + typeof url);
@@ -394,6 +396,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
394396
return this;
395397
};
396398

399+
/* istanbul ignore next: improve coverage */
397400
function validateHostname(self, rest, hostname) {
398401
for (var i = 0, lastPos; i <= hostname.length; ++i) {
399402
var code;
@@ -429,6 +432,7 @@ function validateHostname(self, rest, hostname) {
429432
}
430433
}
431434

435+
/* istanbul ignore next: improve coverage */
432436
function autoEscapeStr(rest) {
433437
var newRest = '';
434438
var lastPos = 0;
@@ -531,6 +535,7 @@ function autoEscapeStr(rest) {
531535
}
532536

533537
// format a parsed object into a url string
538+
/* istanbul ignore next: improve coverage */
534539
function urlFormat(obj) {
535540
// ensure it's an object, and not a string url.
536541
// If it's an obj, this is a no-op.
@@ -547,6 +552,7 @@ function urlFormat(obj) {
547552
return obj.format();
548553
}
549554

555+
/* istanbul ignore next: improve coverage */
550556
Url.prototype.format = function() {
551557
var auth = this.auth || '';
552558
if (auth) {
@@ -623,19 +629,23 @@ Url.prototype.format = function() {
623629
return protocol + host + pathname + search + hash;
624630
};
625631

632+
/* istanbul ignore next: improve coverage */
626633
function urlResolve(source, relative) {
627634
return urlParse(source, false, true).resolve(relative);
628635
}
629636

637+
/* istanbul ignore next: improve coverage */
630638
Url.prototype.resolve = function(relative) {
631639
return this.resolveObject(urlParse(relative, false, true)).format();
632640
};
633641

642+
/* istanbul ignore next: improve coverage */
634643
function urlResolveObject(source, relative) {
635644
if (!source) return relative;
636645
return urlParse(source, false, true).resolveObject(relative);
637646
}
638647

648+
/* istanbul ignore next: improve coverage */
639649
Url.prototype.resolveObject = function(relative) {
640650
if (typeof relative === 'string') {
641651
var rel = new Url();
@@ -908,6 +918,7 @@ Url.prototype.resolveObject = function(relative) {
908918
return result;
909919
};
910920

921+
/* istanbul ignore next: improve coverage */
911922
Url.prototype.parseHost = function() {
912923
var host = this.host;
913924
var port = portPattern.exec(host);
@@ -922,6 +933,7 @@ Url.prototype.parseHost = function() {
922933
};
923934

924935
// About 1.5x faster than the two-arg version of Array#splice().
936+
/* istanbul ignore next: improve coverage */
925937
function spliceOne(list, index) {
926938
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
927939
list[i] = list[k];
@@ -931,6 +943,7 @@ function spliceOne(list, index) {
931943
var hexTable = new Array(256);
932944
for (var i = 0; i < 256; ++i)
933945
hexTable[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
946+
/* istanbul ignore next: improve coverage */
934947
function encodeAuth(str) {
935948
// faster encodeURIComponent alternative for encoding auth uri components
936949
var out = '';

0 commit comments

Comments
 (0)