-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow NPM config variables. Resolve #1711
- Loading branch information
Marcus Zanona
committed
Mar 12, 2015
1 parent
463584e
commit 9aef3b7
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var assert = require('assert'); | ||
|
||
describe('NPM Config on package.json', function () { | ||
describe('Setting process.env.npm_package_config', function () { | ||
/*jshint camelcase:false*/ | ||
process.env.npm_package_config_bower_directory = 'npm-path'; | ||
process.env.npm_package_config_bower_colors = false; | ||
|
||
var config = require('../lib/Config').create().load()._config; | ||
|
||
it('should return "npm-path" for "bower_directory"', function () { | ||
assert.equal('npm-path', config.directory); | ||
}); | ||
it('should return "false" for "bower_colors"', function () { | ||
assert.equal('false', config.colors); | ||
}); | ||
}); | ||
}); |