Skip to content

Commit

Permalink
added failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Aug 14, 2011
1 parent 8d627d7 commit 38bd109
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test.options.args.optional.given.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Module dependencies.
*/

var program = require('../')
, should = require('should');

program
.version('0.0.1')
.option('-c, --cheese [type]', 'optionally specify the type of cheese');

program.parse(['node', 'test', '--cheese', 'feta']);
program.cheese.should.equal('feta');
13 changes: 13 additions & 0 deletions test/test.options.args.optional.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Module dependencies.
*/

var program = require('../')
, should = require('should');

program
.version('0.0.1')
.option('-c, --cheese [type]', 'optionally specify the type of cheese');

program.parse(['node', 'test', '--cheese']);
program.cheese.should.be.true;

0 comments on commit 38bd109

Please sign in to comment.