diff options
-rw-r--r-- | test/packages/npm-test-env-reader/package.json | 18 | ||||
-rwxr-xr-x | test/packages/npm-test-env-reader/test.js | 4 | ||||
-rw-r--r-- | test/packages/npm-test-optional-deps/test.js | 5 |
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") |