faas-cli icon indicating copy to clipboard operation
faas-cli copied to clipboard

pkg commands: creates a function newXCmd() in charge of creating a new command

Open itscaro opened this issue 7 years ago • 1 comments

In some test cases, we need to reset flags & args of the command in test. In the actual used technique, creating the command in global scope and initializes its flags & args in init(), we cannot re-create the command to test it from state-zero.

If there is a testing technique for this case, please enlighten me :-)

Attempt to address this issue: https://github.com/openfaas/faas-cli/compare/master...itscaro:refactor-cmd

itscaro avatar Jan 24 '18 11:01 itscaro

Derek add label: proposal

itscaro avatar Jan 24 '18 14:01 itscaro