You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
674 B

#!/usr/bin/env node
var env = process.env
, orig = require(process.env.npm_package_name+"/package.json").config
, assert = require("assert")
console.log("Before running this test, do:\n"
+" npm config set package-config:foo boo\n"
+"or else it's about to fail.")
assert.equal(env.npm_package_config_foo, "boo", "foo != boo")
assert.equal(orig.foo, "bar", "original foo != bar")
assert.equal(env["npm_config_package-config:foo"], "boo",
"package-config:foo != boo")
console.log({ foo: env.npm_package_config_foo
, orig_foo: orig.foo
, "package-config:foo": env["npm_config_package-config:foo"]
})