diff options
Diffstat (limited to 'deps/npm/test/tap/github-shortcut.js')
-rw-r--r-- | deps/npm/test/tap/github-shortcut.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js index 1b01de4cff..c0a67d21a4 100644 --- a/deps/npm/test/tap/github-shortcut.js +++ b/deps/npm/test/tap/github-shortcut.js @@ -32,10 +32,10 @@ test('github-shortcut', function (t) { 'child_process': { 'execFile': function (cmd, args, options, cb) { process.nextTick(function () { - if (args[0] !== 'clone') return cb(null, '', '') + if (args.indexOf('clone') === -1) return cb(null, '', '') var cloneUrl = cloneUrls.shift() if (cloneUrl) { - t.is(args[3], cloneUrl[0], cloneUrl[1]) + t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1]) } else { t.fail('too many attempts to clone') } @@ -52,8 +52,8 @@ test('github-shortcut', function (t) { loglevel: 'silent' } t.plan(1 + cloneUrls.length) - npm.load(opts, function (er) { - t.ifError(er, 'npm loaded without error') + npm.load(opts, function (err) { + t.ifError(err, 'npm loaded without error') npm.commands.install(['foo/private'], function (er, result) { t.end() }) |