summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/outdated-git.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/outdated-git.js')
-rw-r--r--deps/npm/test/tap/outdated-git.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/deps/npm/test/tap/outdated-git.js b/deps/npm/test/tap/outdated-git.js
index 11c2040227..cc89ff19d9 100644
--- a/deps/npm/test/tap/outdated-git.js
+++ b/deps/npm/test/tap/outdated-git.js
@@ -3,28 +3,29 @@ var test = require("tap").test
var npm = require("../../")
var mkdirp = require("mkdirp")
var rimraf = require("rimraf")
-var mr = require("npm-registry-mock")
+var path = require("path")
// config
-var pkg = __dirname + "/outdated-git"
-mkdirp.sync(pkg + "/cache")
+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: pkg + "/cache", registry: common.registry}, function () {
+ 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])
+ 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(pkg + "/cache")
+ rimraf.sync(cache)
t.end()
})