Is there a BDD framework for testing Javascript that uses Gherkin DSL?
I am very much a fan of BDD开发者_Python百科 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
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!
The official Cucumber for javascript
cucumber.js should be exactly what you're looking for. Not quite finished, but might be worth checking out.
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
Kyuri: https://github.com/nodejitsu/kyuri
精彩评论