diff --git a/test/stores/argv-test.js b/test/stores/argv-test.js index ba651da..fb2b457 100644 --- a/test/stores/argv-test.js +++ b/test/stores/argv-test.js @@ -21,7 +21,6 @@ vows.describe('nconf/stores/argv').addBatch({ "can be created with a custom yargs":{ topic: function(){ var yargsInstance = yargs.alias('v', 'verbose').default('v', 'false'); - console.log(yargsInstance) return [yargsInstance, new nconf.Argv(yargsInstance)]; }, "and can give access to them": function (argv) { @@ -35,6 +34,20 @@ vows.describe('nconf/stores/argv').addBatch({ assert.equal(argv.get('verbose'), 'false'); assert.equal(argv.get('v'), 'false'); } + }, + "can be created with a nconf yargs":{ + topic: function(){ + var options = {verbose: {alias: 'v', default: 'false'}}; + return new nconf.Argv(options); + }, + "and can give access to them": function (argv) { + assert.deepEqual(argv.options, {verbose: {alias: 'v', default: 'false'}}) + }, + "values are the one from the custom yargv": function (argv) { + argv.loadSync() + assert.equal(argv.get('verbose'), 'false'); + assert.equal(argv.get('v'), 'false'); + } } } }).export(module); \ No newline at end of file