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

Function getSingleArgCases

tests/command.argumentVariations.test.js:81–93  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

79 });
80
81 function getSingleArgCases(arg) {
82 return [
83 ['.arguments', new commander.Command().arguments(arg)],
84 ['.argument', new commander.Command().argument(arg)],
85 [
86 '.addArgument',
87 new commander.Command('add-argument').addArgument(
88 new commander.Argument(arg),
89 ),
90 ],
91 ['.command', new commander.Command().command(`command ${arg}`)],
92 ];
93 }
94
95 describe('when add two arguments then two arguments', () => {
96 getMultipleArgCases('<first>', '[second]').forEach(([methodName, cmd]) => {

Calls 4

argumentsMethod · 0.80
argumentMethod · 0.80
addArgumentMethod · 0.80
commandMethod · 0.80

Tested by

no test coverage detected