:sparkles: :rocket: Veggies is an awesome cucumberjs library for API/CLI testing. Great for testing APIs built upon Express, Koa, HAPI, Loopback and others. It's also the perfect companion for testing CLI applications built with commander, meow & Co.
This is an attempt to maintain our custom CLI options while preventing the @cucumbere/cucumber CLI to reject our custom options.
⚠️ This is a work in progress. I want your feeling about this before going further. ⚠️
It uses yargs to parse the process.argv then removes any options that veggies has use of (I think it's better to be loose here in the event of a new cucumber CLI option added).
It rebuild an array of command-line arguments as it could have been passed on the original command before programmatically launching the CLI with those options.
This should launch the CLI without any issue:
$ yarn veggies examples/**/*.feature --cleanSnapshots
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
Failures:
1) Scenario: Running an invalid command # examples/features/cli/yarn.feature:4
? When I run command node -z
[...]
This is an attempt to maintain our custom CLI options while preventing the
@cucumbere/cucumber
CLI to reject our custom options.⚠️ This is a work in progress. I want your feeling about this before going further. ⚠️
It uses
yargs
to parse theprocess.argv
then removes any options that veggies has use of (I think it's better to be loose here in the event of a new cucumber CLI option added).It rebuild an array of command-line arguments as it could have been passed on the original command before programmatically launching the CLI with those options.
This should launch the CLI without any issue:
An unknown option is passed to the cucumber CLI: