CucumberJS is a JavaScript port of the popular BDD tool Cucumber (which itself was a rewrite of RSpec). It allows you to define Feature Specs in a Domain-Specific-Language (DSL) - called Gherkin - and run your specs using a command line tool which will report the passing and/or failing of scenarios and the steps they are comprised of.
It is important to note that Cucumber itself does not provide a default assertion library. It is a testing framework providing a command line tool that consumes defined Features and validates Scenarios by running Steps that are written in JavaScript. It is the developers choice to include the desired assertion library used in order to make those steps pass or fail. It is my intent to clarify the process by example through a single Feature with multiple Scenarios in this post.
If you had followed along in the previous TDD Series, you will find the specs defined in that series similar to Gherkin. In fact, I will be re-hashing a feature spec from that series to demonstrate working through your first cuke (aka, passing feature spec).
Your new post is loading...
follow up:
http://custardbelly.com/blog/blog-posts/2014/01/22/cucumberjs-world/index.html