1 var common = require("../common-tap")
2 , path = require("path")
3 , test = require("tap").test
4 , rimraf = require("rimraf")
5 , npm = require("../../")
6 , mr = require("npm-registry-mock")
7 , pkg = path.resolve(__dirname, "outdated-depth-deep")
8 , cache = path.resolve(pkg, "cache")
10 var osenv = require("osenv")
11 var mkdirp = require("mkdirp")
12 var fs = require("fs")
14 var pj = JSON.stringify({
16 "description": "yeah idk",
20 "underscore": "1.3.1",
21 "npm-test-peer-deps": "0.0.0"
23 "repository": "git://github.com/luk-/whatever"
27 process.chdir(osenv.tmpdir())
34 fs.writeFileSync(path.resolve(pkg, "package.json"), pj)
37 test("setup", function (t) {
43 test("outdated depth deep (9999)", function (t) {
44 var underscoreOutdated = ["underscore", "1.3.1", "1.3.1", "1.5.1", "1.3.1"]
45 var childPkg = path.resolve(pkg, "node_modules", "npm-test-peer-deps")
47 var expected = [ [pkg].concat(underscoreOutdated),
48 [childPkg].concat(underscoreOutdated) ]
52 mr({port : common.port}, function (er, s) {
56 , registry: common.registry
60 npm.install(".", function (er) {
61 if (er) throw new Error(er)
62 npm.outdated(function (err, d) {
63 if (err) throw new Error(err)
64 t.deepEqual(d, expected)
75 test("cleanup", function (t) {