node/deps/npm/test/tap/outdated-include-devdepende...

29 lines
696 B
JavaScript
Raw Normal View History

2013-11-21 03:08:52 +08:00
var common = require("../common-tap.js")
2013-10-25 00:21:59 +08:00
var test = require("tap").test
var npm = require("../../")
2013-11-21 03:08:52 +08:00
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
2013-10-25 00:21:59 +08:00
var mr = require("npm-registry-mock")
// config
var pkg = __dirname + '/outdated-include-devdependencies'
2013-11-21 03:08:52 +08:00
mkdirp.sync(pkg + "/cache")
2013-10-25 00:21:59 +08:00
test("includes devDependencies in outdated", function (t) {
process.chdir(pkg)
2013-11-21 03:08:52 +08:00
mr(common.port, function (s) {
npm.load({cache: pkg + "/cache", registry: common.registry}, function () {
2013-10-25 00:21:59 +08:00
npm.outdated(function (er, d) {
t.equal("1.5.1", d[0][3])
s.close()
t.end()
})
})
})
2013-11-21 03:08:52 +08:00
})
test("cleanup", function (t) {
rimraf.sync(pkg + "/cache")
t.end()
})