@@ -30,6 +30,9 @@ describe('options', function () {
30
30
process . env . npm_config_y = '41'
31
31
// Package config should take precedence over npm_config_ keys.
32
32
process . env . npm_package_config_node_gyp_y = '42'
33
+ // All configs should be case-insensitive.
34
+ process . env . NPM_PACKAGE_CONFIG_NODE_GYP_XX = 'value'
35
+ process . env . NPM_CONFIG_YY = 'value'
33
36
// loglevel does not get added to opts but will change the logger's level.
34
37
process . env . npm_config_loglevel = 'silly'
35
38
@@ -41,10 +44,12 @@ describe('options', function () {
41
44
42
45
assert . strictEqual ( log . logger . level . id , 'silly' )
43
46
44
- assert . deepStrictEqual ( Object . keys ( g . opts ) . sort ( ) , [ ...keys , 'argv' , 'x' , 'y' , 'foo' ] . sort ( ) )
47
+ assert . deepStrictEqual ( Object . keys ( g . opts ) . sort ( ) , [ ...keys , 'argv' , 'x' , 'y' , 'foo' , 'xx' , 'yy' ] . sort ( ) )
45
48
assert . strictEqual ( g . opts [ 'x' ] , '42' )
46
49
assert . strictEqual ( g . opts [ 'y' ] , '42' )
47
50
assert . strictEqual ( g . opts [ 'foo' ] , '42' )
51
+ assert . strictEqual ( g . opts [ 'xx' ] , 'value' )
52
+ assert . strictEqual ( g . opts [ 'yy' ] , 'value' )
48
53
} )
49
54
50
55
it ( 'options with spaces in environment' , ( ) => {
0 commit comments