Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-03-13 05:49:54 +0400
committerisaacs <i@izs.me>2012-03-13 05:49:54 +0400
commitb69adc9ca948afb349f9ac946550159aed69b8dd (patch)
tree5dd95616581b746b3f48e872b5a5bb597cabeafb
parentc03e41e329f50fb3cb6a40df2bb118ea71b6729f (diff)
Fix failing tests
-rw-r--r--test/packages/npm-test-env-reader/package.json18
-rwxr-xr-xtest/packages/npm-test-env-reader/test.js4
-rw-r--r--test/packages/npm-test-optional-deps/test.js5
3 files changed, 14 insertions, 13 deletions
diff --git a/test/packages/npm-test-env-reader/package.json b/test/packages/npm-test-env-reader/package.json
index a2dfd70b7..99d7fc930 100644
--- a/test/packages/npm-test-env-reader/package.json
+++ b/test/packages/npm-test-env-reader/package.json
@@ -1,14 +1,14 @@
{ "name":"npm-test-env-reader"
, "version" : "1.2.3"
, "scripts" :
- { "install" : "./test.js"
- , "preinstall" : "./test.js"
- , "preuninstall" : "./test.js"
- , "postuninstall" : "./test.js"
- , "test" : "./test.js"
- , "stop" : "./test.js"
- , "start" : "./test.js"
- , "restart" : "./test.js"
- , "foo" : "./test.js"
+ { "install" : "node test.js"
+ , "preinstall" : "node test.js"
+ , "preuninstall" : "node test.js"
+ , "postuninstall" : "node test.js"
+ , "test" : "node test.js"
+ , "stop" : "node test.js"
+ , "start" : "node test.js"
+ , "restart" : "node test.js"
+ , "foo" : "node test.js"
}
}
diff --git a/test/packages/npm-test-env-reader/test.js b/test/packages/npm-test-env-reader/test.js
index d9e336cbf..d6cb7893a 100755
--- a/test/packages/npm-test-env-reader/test.js
+++ b/test/packages/npm-test-env-reader/test.js
@@ -1,6 +1,6 @@
var envs = []
-for (var e in path.env) {
- if (e.match(/npm|^path$/i)) envs.push(e + '=' + path.env[e])
+for (var e in process.env) {
+ if (e.match(/npm|^path$/i)) envs.push(e + '=' + process.env[e])
}
envs.sort(function (a, b) {
return a === b ? 0 : a > b ? -1 : 1
diff --git a/test/packages/npm-test-optional-deps/test.js b/test/packages/npm-test-optional-deps/test.js
index 5146251d1..2232906d6 100644
--- a/test/packages/npm-test-optional-deps/test.js
+++ b/test/packages/npm-test-optional-deps/test.js
@@ -3,6 +3,7 @@ var assert = require("assert")
var path = require("path")
// sax should be the only dep that ends up installed
-assert.deepEqual(fs.readdirSync(path.resolve(__dirname, "node_modules")
- ,["sax"]))
+
+var dir = path.resolve(__dirname, "node_modules")
+assert.deepEqual(fs.readdirSync(dir), ["sax"])
assert.equal(require("sax/package.json").version, "0.3.5")