https://github.com/robtimus/jest-cucumber-enhanced-autobind
A replacement for jest-cucumber's autoBindSteps that allows more configuration options
https://github.com/robtimus/jest-cucumber-enhanced-autobind
cucumber gherkin jest testing
Last synced: 6 months ago
JSON representation
A replacement for jest-cucumber's autoBindSteps that allows more configuration options
- Host: GitHub
- URL: https://github.com/robtimus/jest-cucumber-enhanced-autobind
- Owner: robtimus
- License: apache-2.0
- Archived: true
- Created: 2021-12-23T12:26:28.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T12:23:20.000Z (about 3 years ago)
- Last Synced: 2024-10-01T15:07:04.995Z (10 months ago)
- Topics: cucumber, gherkin, jest, testing
- Language: TypeScript
- Homepage:
- Size: 321 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# jest-cucumber-enhanced-autobind
A replacement for [jest-cucumber](https://www.npmjs.com/package/jest-cucumber)'s [autoBindSteps](https://github.com/bencompton/jest-cucumber/blob/HEAD/docs/AutomaticStepBinding.md) that allows more configuration options as an optional third argument.
Available options:
* `beforeFeature`: a function that runs before each feature. The feature is given as function argument.
* `afterFeature`: a function that runs after each feature. The feature is given as function argument.
* `beforeScenario`: a function that runs before each scenario. The feature is given as function argument. Unfortunately, the scenario is not available.
* `afterScenario`: a function that runs after each scenario. The feature is given as function argument. Unfortunately, the scenario is not available.
* `scope`: the scope to register step definitions for. The narrower the scope, the smaller the chances for conflicts.\
Possible values:
* `global`: step definitions are registered globally. This scope works just like `jest-cucumber`'s own `autoBindSteps`.
* `local` (default): step definitions are registered per call to `autoBindSteps`. This scope works just like [@saasquatch/scoped-autobindsteps](https://www.npmjs.com/package/@saasquatch/scoped-autobindsteps).## Deprecated
As of 2022-06-26, this project is no longer maintained. Unlike Jest's `beforeAll`, `afterAll`, `beforeEach` and `afterEach`, the callback functions don't allow timeouts to be specified, and don't support the `done` argument that Jest's callback functions support. Just use Jest's callback functions in the same scope where `jest-cucumber`'s `autoBindSteps` is used.