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

Function getMultipleArgCases

tests/command.argumentVariations.test.js:104–116  ·  view source on GitHub ↗
(arg1, arg2)

Source from the content-addressed store, hash-verified

102 });
103
104 function getMultipleArgCases(arg1, arg2) {
105 return [
106 ['.arguments', new commander.Command().arguments(`${arg1} ${arg2}`)],
107 ['.argument', new commander.Command().argument(arg1).argument(arg2)],
108 [
109 '.addArgument',
110 new commander.Command('add-argument')
111 .addArgument(new commander.Argument(arg1))
112 .addArgument(new commander.Argument(arg2)),
113 ],
114 ['.command', new commander.Command().command(`command ${arg1} ${arg2}`)],
115 ];
116 }
117
118 test('when add arguments using multiple methods then all added', () => {
119 // This is not a key use case, but explicitly test that additive behaviour.

Calls 4

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

Tested by

no test coverage detected