cucumber-enhancement
Enhances cucumber.js to make it easier to interact between steps.
Simple usage
- Create a file
features/step_definitions/world-enhance.js
as follows
const {setWorldConstructor} = require('cucumber');
setWorldConstructor(require('cucumber-enhancement'));
This modifies the World object to do the following:
- Write attributes for later retrieval:
;
- Read attributes from previous steps:
;
- Exposes
joi
interface for quick access during step definition (see above).