File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ vows.describe('nconf/stores/argv').addBatch({
2121 "can be created with a custom yargs" :{
2222 topic : function ( ) {
2323 var yargsInstance = yargs . alias ( 'v' , 'verbose' ) . default ( 'v' , 'false' ) ;
24- console . log ( yargsInstance )
2524 return [ yargsInstance , new nconf . Argv ( yargsInstance ) ] ;
2625 } ,
2726 "and can give access to them" : function ( argv ) {
@@ -35,6 +34,20 @@ vows.describe('nconf/stores/argv').addBatch({
3534 assert . equal ( argv . get ( 'verbose' ) , 'false' ) ;
3635 assert . equal ( argv . get ( 'v' ) , 'false' ) ;
3736 }
37+ } ,
38+ "can be created with a nconf yargs" :{
39+ topic : function ( ) {
40+ var options = { verbose : { alias : 'v' , default : 'false' } } ;
41+ return new nconf . Argv ( options ) ;
42+ } ,
43+ "and can give access to them" : function ( argv ) {
44+ assert . deepEqual ( argv . options , { verbose : { alias : 'v' , default : 'false' } } )
45+ } ,
46+ "values are the one from the custom yargv" : function ( argv ) {
47+ argv . loadSync ( )
48+ assert . equal ( argv . get ( 'verbose' ) , 'false' ) ;
49+ assert . equal ( argv . get ( 'v' ) , 'false' ) ;
50+ }
3851 }
3952 }
4053} ) . export ( module ) ;
You can’t perform that action at this time.
0 commit comments