Cucumber.js or Mocha?
Which is better? Cucumber.js or Mocha? There is no clear answer to this question, but here is my advice: if you have engaged stakeholders who are willing to read or even write the Gherkin code, go for Cucumber.js. If you are not in this (fortunate) situation, then using Cucumber.js is not so attractive.
Even if you are in this situation, you need to think twice before using Cucumber.js, specially if you are new to BDD or JS. The main problem with Cucumber.js is that you need to invest a lot in the test support code that translates the Gherkin to real code. This effort is wasted if the stakeholders are not going to, at least, read the Gherkin code and give you feedback on the intended behavior of the system.
On the technical ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access