test.options.version.customHelpDescription.js
This file
Path
test/test.options.version.customHelpDescription.js
22 lines · 603 bytes · JavaScript
Last changed by
Merge branch 'idmontie-feature/issue-47-add-version-help-message-override' into release/3.0.0John Geebefore adoptionafb8156
History of this fileTake it
1234567891011121314151617181920212223var program = require('../') , sinon = require('sinon').sandbox.create() , should = require('should');
program.version('1.0.0', undefined, 'custom version output');program.command('somecommand');program.command('anothercommand [options]');
var expectedHelpInformation = [ 'Usage: [options] [command]', '', 'Options:', ' -V, --version custom version output', ' -h, --help output usage information', '', 'Commands:', ' somecommand', ' anothercommand [options]', ''].join('\n');
program.helpInformation().should.equal(expectedHelpInformation);