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

Function makeProgram

tests/command.positionalOptions.test.js:10–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8describe('positional options using Command.passThroughOptions() and Command.enablePositionalOptions()', () => {
9 describe('program with passThrough', () => {
10 function makeProgram() {
11 const program = new commander.Command();
12 program.passThroughOptions();
13 program.option('-d, --debug').argument('<args...>');
14 return program;
15 }
16
17 test('when option before command-argument then option parsed', () => {
18 const program = makeProgram();

Calls 6

passThroughOptionsMethod · 0.95
optionMethod · 0.95
commandMethod · 0.95
argumentMethod · 0.80
actionMethod · 0.80

Tested by

no test coverage detected