-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem? Please describe.
I'm in the process of adding support for cucumber-js in StrykerJS, the mutation testing framework for JavaScript and friends. See stryker-mutator/stryker-js#2970
I would like to use cucumber programmatically. In fact, I'm already doing that in the MR. However, I realize that I'm using an undocumented API, which I don't like doing, since the implementation could break in a patch release version. I strive to use public APIs only.
Describe the solution you'd like
Would you accept a PR that documents the use of the Cli
class for public usage?
const { Cli } = require('@cucumber/cucumber')
I would add it to your docs directory. Either in a new file (programmatic-usage.md
) or add it to the cli.md
file.
Describe alternatives you've considered
Additional context
In order to make mutation testing feasible, we need a programmatic API. Simply calling childProcess.exec
to execute cucumber-js would work, but is terrible for performance since Stryker will run cucumber-js many times during a mutation testing run.