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
Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
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 }Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
lines 14–18why, one step back14 }1516 const program = new MyCommand();17 expect(program.helpInformation()).toEqual('custom');18});