Skip to content

Commit

Permalink
Replace 1 instance of regex with cucumber expression (#1872)
Browse files Browse the repository at this point in the history
* Replace regex with cucumber expression.

We decided to split the step definition into two. So that the patterns used be simpler.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>

* Fix linting issues

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
  • Loading branch information
5 people authored Dec 29, 2021
1 parent b53d820 commit 385c262
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion features/step_definitions/cli_steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ When('my env includes {string}', function (this: World, envString: string) {
this.sharedEnv = this.parseEnvString(envString)
})

When('I run cucumber-js', { timeout: 10000 }, async function (this: World) {
return await this.run(this.localExecutablePath, [])
})

When(
/^I run cucumber-js(?: with `(|.+)`)?$/,
'I run cucumber-js with `{}`',
{ timeout: 10000 },
async function (this: World, args: string) {
const renderedArgs = Mustache.render(valueOrDefault(args, ''), this)
Expand Down

0 comments on commit 385c262

Please sign in to comment.