Skip to content
Myr

command.createHelp.test.js

This file

Path

tests/command.createHelp.test.js

18 lines · 435 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than cc2db5b point at it.

Add optional summary for short form of subcommand description. (#1726)John Geebefore adoptioncc2db5b

lines 1–18why, one step back
1const 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());13 }14 }1516 const program = new MyCommand();17 expect(program.helpInformation()).toEqual('custom');18});