Asynchronous javascript execution in node with cucumber

Viewed 5968

I'm working with selenium to write a test suite. The project is in node. I want to refactor the code into a BDD/cucumber model. It looks like using cucumber-js, asynchronous code inside step definitions is not being executed when I run a feature.

Currently I'm using Mocha to manage all the Promises returned from the selenium library and ensure all the asynch operations are run. There is an alternate Cucumber library (gherkin-mocha) that is much older and less maintained that might work.

How can I run asynch operations inside Cucumber steps? Is it possible to use Mocha alongside this?

1 Answers
Related