February 2013
Intermediate to advanced
272 pages
5h 45m
English
| Recipe 31 | Drive JavaScript/CoffeeScript Using Cucumber-JS |
You’re testing JavaScript code that’s running either on the server side in a framework like Node.js or in the browser. You’d like to use the familiar Cucumber syntax to drive your JavaScript (or possibly CoffeeScript) code.
Cucumber-JS,[196] an implementation of Cucumber written in JavaScript
Node.js (or just Node),[197] a JavaScript application framework
Node Package Manager,[198] the main way of installing libraries into Node
CoffeeScript,[199] a more elegant syntax for JavaScript
JavaScript runs in a lot of environments, from GUI code in the browser to back-end server frameworks like Node.js. In this recipe, we’re going to write a simple Cucumber test for some ...