diff --git a/features/step_definitions/cli_steps.ts b/features/step_definitions/cli_steps.ts index c015f3d49..2431b422b 100644 --- a/features/step_definitions/cli_steps.ts +++ b/features/step_definitions/cli_steps.ts @@ -30,7 +30,7 @@ When( ) When( - /^I run cucumber-js with arguments `(|.+)` and env `(|.+)`$/, + 'I run cucumber-js with arguments `{}` and env `{}`', { timeout: 10000 }, async function (this: World, args: string, envString: string) { const renderedArgs = Mustache.render(valueOrDefault(args, ''), this) @@ -41,7 +41,7 @@ When( ) When( - /^I run cucumber-js with env `(|.+)`$/, + 'I run cucumber-js with env `{}`', { timeout: 10000 }, async function (this: World, envString: string) { const env = this.parseEnvString(envString) @@ -50,7 +50,18 @@ When( ) When( - /^I run cucumber-js with all formatters(?: and `(|.+)`)?$/, + 'I run cucumber-js with all formatters', + { timeout: 10000 }, + async function (this: World) { + const args = '--format html:html.out --format json:json.out' + const renderedArgs = Mustache.render(args, this) + const stringArgs = stringArgv(renderedArgs) + return await this.run(this.localExecutablePath, stringArgs) + } +) + +When( + 'I run cucumber-js with all formatters and `{}`', { timeout: 10000 }, async function (this: World, args: string) { if (doesNotHaveValue(args)) {