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
Merge branch 'idmontie-feature/issue-47-add-version-help-message-override' into release/3.0.0John Geebefore adoptionafb8156
lines 1–22why, one step back1var program = require('../')2 , sinon = require('sinon').sandbox.create()3 , should = require('should');45program.version('1.0.0', undefined, 'custom version output');6program.command('somecommand');7program.command('anothercommand [options]');89var expectedHelpInformation = [10 'Usage: [options] [command]',11 '',12 'Options:',13 ' -V, --version custom version output',14 ' -h, --help output usage information',15 '',16 'Commands:',17 ' somecommand',18 ' anothercommand [options]',19 ''20].join('\n');2122program.helpInformation().should.equal(expectedHelpInformation);