Skip to content

Commit

Permalink
Fix lifecycle test
Browse files Browse the repository at this point in the history
The test in 8b5e7b6 fails as it depends on a unconfigured npm
which uses exact the same values as a vanilla npmconf instance.

This fix also does not depends on the external dependency npmconf.
  • Loading branch information
robertkowalski committed Apr 18, 2014
1 parent 218d427 commit 89bf6f2
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions test/tap/lifecycle.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
var test = require("tap").test
var npm = require('../../')
var path = require("path")
var pkg = path.resolve(__dirname, "..", "..")
var lifecycle = require('../../lib/utils/lifecycle')
var Conf = require("npmconf").Conf

test("lifecycle: make env correctly", function (t) {
npm.load(function() {
var env = lifecycle.makeEnv(pkg)
npm.load({enteente: Infinity}, function() {
var env = lifecycle.makeEnv({}, null, process.env)

var conf = new Conf()
conf.addEnv(env)
conf.keys.forEach(function (key) {
t.equal(conf.get(key), npm.config.get(key))
})
t.equal('Infinity', env.npm_config_enteente)
t.end()
})
})

0 comments on commit 89bf6f2

Please sign in to comment.