MCPcopy
hub / github.com/tj/commander.js / makeProgram

Function makeProgram

tests/help.style.test.js:18–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17describe('Help.configureHelp() overrides of style methods', () => {
18 function makeProgram() {
19 const program = new Command('program')
20 .description('program description')
21 .argument('<file>', 'arg description')
22 .configureOutput({
23 getOutHasColors: () => true, // avoid interactions with testing environment
24 });
25 program
26 .command('subcommand')
27 .description('sub description')
28 .option('--suboption')
29 .argument('[subarg]');
30
31 return program;
32 }
33
34 const plainHelpInformation = makeProgram().helpInformation();
35

Callers 1

help.style.test.jsFile · 0.70

Calls 8

descriptionMethod · 0.95
configureHelpMethod · 0.95
stripRedFunction · 0.85
redFunction · 0.85
configureOutputMethod · 0.80
argumentMethod · 0.80
optionMethod · 0.80
commandMethod · 0.80

Tested by

no test coverage detected