blob: cc89ff19d98fc643900ddc6984b2ce5ac72865f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
var common = require("../common-tap.js")
var test = require("tap").test
var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
var path = require("path")
// config
var pkg = path.resolve(__dirname, "outdated-git")
var cache = path.resolve(pkg, "cache")
mkdirp.sync(cache)
test("dicovers new versions in outdated", function (t) {
process.chdir(pkg)
t.plan(5)
npm.load({cache: cache, registry: common.registry}, function () {
npm.commands.outdated([], function (er, d) {
t.equal("git", d[0][3])
t.equal("git", d[0][4])
t.equal("git://github.com/robertkowalski/foo-private.git", d[0][5])
t.equal("git://user:pass@github.com/robertkowalski/foo-private.git", d[1][5])
t.equal("git+https://github.com/robertkowalski/foo", d[2][5])
})
})
})
test("cleanup", function (t) {
rimraf.sync(cache)
t.end()
})
|