Skip to content

Commit 2a28125

Browse files
committed
clean up tests
1 parent c905d65 commit 2a28125

15 files changed

+5136
-5616
lines changed

index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function mkdirP (p, opts, f, made) {
2121
}
2222
if (!made) made = null;
2323

24-
var cb = f || function () {};
24+
var cb = f || /* istanbul ignore next */ function () {};
2525
p = path.resolve(p);
2626

2727
xfs.mkdir(p, mode, function (er) {
@@ -31,8 +31,10 @@ function mkdirP (p, opts, f, made) {
3131
}
3232
switch (er.code) {
3333
case 'ENOENT':
34+
/* istanbul ignore if */
3435
if (path.dirname(p) === p) return cb(er);
3536
mkdirP(path.dirname(p), opts, function (er, made) {
37+
/* istanbul ignore if */
3638
if (er) cb(er, made);
3739
else mkdirP(p, opts, cb, made);
3840
});
@@ -87,9 +89,10 @@ mkdirP.sync = function sync (p, opts, made) {
8789
try {
8890
stat = xfs.statSync(p);
8991
}
90-
catch (err1) {
92+
catch (err1) /* istanbul ignore next */ {
9193
throw err0;
9294
}
95+
/* istanbul ignore if */
9396
if (!stat.isDirectory()) throw err0;
9497
break;
9598
}

0 commit comments

Comments
 (0)