I am very much a fan of BDD and Behat for PHP. Is there something equivalent for Javascript, ie, that uses the Gherkin DSL? Everything I've seen so far is more in line with RSpec, and I would like to approach JS testing more like Cucumber, if possible
Asked
Active
Viewed 7,609 times
16
-
2The accepted answer is no longer a valid and the Kyuri repo is out of date. The correct answer is Johnno Nolan's: https://github.com/cucumber/cucumber-js – Xolv.io Nov 14 '15 at 19:41
-
@Xolv.io You're right. Updated. Thx! – JoshuaDavid Nov 15 '15 at 13:12
4 Answers
11
There is one being developed as i write - help out if you can http://groups.google.com/group/cukes/browse_thread/thread/56ba76eac2e9dab3
Edit and now its here!

Johnno Nolan
- 29,228
- 19
- 111
- 160
6
cucumber.js should be exactly what you're looking for. Not quite finished, but might be worth checking out.

slipset
- 2,960
- 2
- 21
- 17
4
Yadda supports a Given / When / Then style syntax. It plugs into other testing frameworks like qunit, mocha or casperjs, and allows you to write tests as follows...
Scenario: A bottle falls from the wall
Given 100 green bottles are standing on the wall
when 1 green bottle accidentally falls
then there are 99 green bottles standing on the wall
Scenario: No bottles are left
Given 1 green bottles are standing on the wall
when 1 green bottle accidentally falls
then there are 0 green bottles standing on the wall

Steve
- 3
- 1

cressie176
- 959
- 7
- 8