summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/outdated-private.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/outdated-private.js')
-rw-r--r--deps/npm/test/tap/outdated-private.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/deps/npm/test/tap/outdated-private.js b/deps/npm/test/tap/outdated-private.js
index 7e43be7a5..069698804 100644
--- a/deps/npm/test/tap/outdated-private.js
+++ b/deps/npm/test/tap/outdated-private.js
@@ -31,15 +31,16 @@ test("outdated ignores private modules", function (t) {
function () {
npm.install(".", function (err) {
t.ifError(err, "install success")
+ bumpLocalPrivate()
npm.outdated(function (er, d) {
t.ifError(er, "outdated success")
t.deepEqual(d, [[
path.resolve(__dirname, "outdated-private"),
"underscore",
"1.3.1",
- "1.3.1",
"1.5.1",
- "file:underscore"
+ "1.5.1",
+ "underscore@1.5.1"
]])
s.close()
})
@@ -70,6 +71,12 @@ var pjLocalPrivate = JSON.stringify({
private : true
}, null, 2) + "\n"
+var pjLocalPrivateBumped = JSON.stringify({
+ name : "local-private",
+ version : "1.1.0",
+ private : true
+}, null, 2) + "\n"
+
var pjScopedLocalPrivate = JSON.stringify({
name : "@scoped/another-local-private",
version : "1.0.0",
@@ -95,6 +102,10 @@ function bootstrap () {
fs.writeFileSync(path.resolve(pkgLocalUnderscore, "package.json"), pjLocalUnderscore)
}
+function bumpLocalPrivate () {
+ fs.writeFileSync(path.resolve(pkgLocalPrivate, "package.json"), pjLocalPrivateBumped)
+}
+
function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)