diff options
author | Yeonghoon Park <sola92@gmail.com> | 2014-02-18 16:22:41 +0400 |
---|---|---|
committer | Domenic Denicola <domenic@domenicdenicola.com> | 2014-04-18 08:04:04 +0400 |
commit | 8b5e7b6ae5b4cd2d7d62eaf93b1428638b387072 (patch) | |
tree | 74d1a17652282ba343ac4816cefbd49b91575a87 /test | |
parent | 3e03524f8a109e6ad07c9fa04a41c7b3202b168f (diff) |
Add test for lifecycle.makeEnv()
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/lifecycle.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/tap/lifecycle.js b/test/tap/lifecycle.js new file mode 100644 index 000000000..b9ede6c5a --- /dev/null +++ b/test/tap/lifecycle.js @@ -0,0 +1,19 @@ +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) + + var conf = new Conf() + conf.addEnv(env) + conf.keys.forEach(function (key) { + t.equal(conf.get(key), npm.config.get(key)) + }) + t.end() + }) +}) |