@@ -30,6 +30,9 @@ describe('options', function () {
3030 process . env . npm_config_y = '41'
3131 // Package config should take precedence over npm_config_ keys.
3232 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'
3336 // loglevel does not get added to opts but will change the logger's level.
3437 process . env . npm_config_loglevel = 'silly'
3538
@@ -41,10 +44,12 @@ describe('options', function () {
4144
4245 assert . strictEqual ( log . logger . level . id , 'silly' )
4346
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 ( ) )
4548 assert . strictEqual ( g . opts [ 'x' ] , '42' )
4649 assert . strictEqual ( g . opts [ 'y' ] , '42' )
4750 assert . strictEqual ( g . opts [ 'foo' ] , '42' )
51+ assert . strictEqual ( g . opts [ 'xx' ] , 'value' )
52+ assert . strictEqual ( g . opts [ 'yy' ] , 'value' )
4853 } )
4954
5055 it ( 'options with spaces in environment' , ( ) => {
0 commit comments