diff options
author | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-02-16 20:43:16 -0800 |
commit | ec2fc4ca4d3eacaa3dc1db1673169b89233b9823 (patch) | |
tree | 0aa8a647e5111653bdf9c122182be93bf8823c7b /deps/npm/test/tap/outdated.js | |
parent | 86b8d84811484763b251b9a8a2b9e673964ea6b5 (diff) | |
download | node-npm-v1.4.3.tar.gz |
npm: upgrade to 1.4.3npm-v1.4.3
Diffstat (limited to 'deps/npm/test/tap/outdated.js')
-rw-r--r-- | deps/npm/test/tap/outdated.js | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js index 3a9951b3c..dddec77ea 100644 --- a/deps/npm/test/tap/outdated.js +++ b/deps/npm/test/tap/outdated.js @@ -8,19 +8,41 @@ var mr = require("npm-registry-mock") // config var pkg = __dirname + '/outdated' +var path = require("path") + test("it should not throw", function (t) { cleanup() process.chdir(pkg) + var originalLog = console.log + var output = [] + var expOut = [ path.resolve(__dirname, "outdated/node_modules/underscore") + , path.resolve(__dirname, "outdated/node_modules/underscore") + + ":underscore@1.3.1" + + ":underscore@1.3.1" + + ":underscore@1.5.1" ] + var expData = [ [ path.resolve(__dirname, "outdated") + , "underscore" + , "1.3.1" + , "1.3.1" + , "1.5.1" + , "1.3.1" ] ] + + console.log = function () { + output.push.apply(output, arguments) + } mr(common.port, function (s) { npm.load({ cache: pkg + "/cache", loglevel: 'silent', + parseable: true, registry: common.registry } , function () { npm.install(".", function (err) { npm.outdated(function (er, d) { - console.log(d) + console.log = originalLog + t.same(output, expOut) + t.same(d, expData) s.close() t.end() }) |