diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-09-13 11:06:46 +0400 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-09-13 11:06:46 +0400 |
commit | ca0ef0e99bbdeccf28d550d0296baa4cb5e7ece2 (patch) | |
tree | 18239c02ea3ac880895cd7a7df0767ca9f428b62 /test | |
parent | a11c88bdb1488b87d8dcac69df9a55a7a91184b6 (diff) |
fix relative paths in local dependencies
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/cache-add-localdir-fallback.js | 12 | ||||
-rw-r--r-- | test/tap/optional-metadep-rollback-collision/deps/opdep/package.json | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/tap/cache-add-localdir-fallback.js b/test/tap/cache-add-localdir-fallback.js index 5cd27f2e7..6b036c380 100644 --- a/test/tap/cache-add-localdir-fallback.js +++ b/test/tap/cache-add-localdir-fallback.js @@ -4,7 +4,7 @@ var npm = require("../../lib/npm.js") var requireInject = require("require-inject") npm.load({loglevel : "silent"}, function () { - var resolved = path.resolve(".", "dir-with-package") + var resolved = path.resolve(__dirname, "dir-with-package") var resolvedPackage = path.join(resolved, "package.json") var cache = requireInject("../../lib/cache.js", { @@ -52,23 +52,23 @@ npm.load({loglevel : "silent"}, function () { test("npm install localdir fallback", function (t) { t.plan(10) - cache.add("named", null, false, function (er, which) { + cache.add("named", null, null, false, function (er, which) { t.ifError(er, "named was cached") t.is(which, "addNamed", "registry package name") }) - cache.add("file.tgz", null, false, function (er, which) { + cache.add("file.tgz", null, null, false, function (er, which) { t.ifError(er, "file.tgz was cached") t.is(which, "addLocal", "local file") }) - cache.add("dir-no-package", null, false, function (er, which) { + cache.add("dir-no-package", null, null, false, function (er, which) { t.ifError(er, "local directory was cached") t.is(which, "addNamed", "local directory w/o package.json") }) - cache.add("dir-with-package", null, false, function (er, which) { + cache.add("dir-with-package", null, null, false, function (er, which) { t.ifError(er, "local directory with package was cached") t.is(which,"addLocal", "local directory with package.json") }) - cache.add("file:./dir-with-package", null, false, function (er, which) { + cache.add("file:./dir-with-package", null, __dirname, false, function (er, which) { t.ifError(er, "local directory (as URI) with package was cached") t.is(which, "addLocal", "file: URI to local directory with package.json") }) diff --git a/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json b/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json index 50f7c1b3b..3289c123e 100644 --- a/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json +++ b/test/tap/optional-metadep-rollback-collision/deps/opdep/package.json @@ -7,8 +7,8 @@ "preinstall": "node bad-server.js" }, "dependencies": { - "d1": "file:./deps/d1", - "d2": "file:./deps/d2" + "d1": "file:../d1", + "d2": "file:../d2" }, "author": "Forrest L Norvell <ogd@aoaioxxysz.net>", "license": "ISC" |