command.createHelp.test.js
This file
Path
tests/command.createHelp.test.js
18 lines · 435 bytes · JavaScript
Last changed by
Merge pull request #1683 from tj/release/9.xJohn Geebefore adoption02a124c
History of this fileTake it
The walk stopped after 200 commits: lines older than 20cef03 point at it.
Update supported details for 7.x (#1419)John Geebefore adoption20cef03
lines 1–12why, one step back1const commander = require('../');23test('when override createCommand then affects help', () => {4 class MyHelp extends commander.Help {5 formatHelp(cmd, helper) {6 return 'custom';7 }8 }910 class MyCommand extends commander.Command {11 createHelp() {12 return Object.assign(new MyHelp(), this.configureHelp());Merge pull request #1683 from tj/release/9.xJohn Geebefore adoption02a124c
line 13why, one step back13 }Update supported details for 7.x (#1419)John Geebefore adoption20cef03
lines 14–18why, one step back14 }1516 const program = new MyCommand();17 expect(program.helpInformation()).toEqual('custom');18});