We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
To test terminal commands, you can mock out program.ARGV:
program.ARGV
program = require('commander') program .version('0.0.1') .option('-f, --foo', 'add some foo') .option('-b, --bar', 'add some bar') argv = ['node', 'test', '--foo', '--', '--bar', 'baz'] # program.ARGV mock program.parse(argv)