Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BDD for client-side JavaScript with Node.js

BDD for client-side JavaScript with Node.js

Short presentation about implementing BDD techniques for client-side JavaScript and running the specs in the console. MeetJS Kraków, 11 June 2012 (http://www.meetjs.org).

Dariusz Dziuk

June 12, 2012
Tweet

Other Decks in Programming

Transcript

  1. ...or compile your code in Node.js you can import regular

    JS les, but pay attention to namespaces
  2. it’s super easy to manage and monitor current scope number

    of pending tests represents the project status in current scope
  3. integrate it with your CI system it’s running in the

    console, hence it’s trivial to make it a build step
  4. there’s more using mock library of your choice you can

    fake AJAX request and even use dummy timers
  5. resources Node.js http://nodejs.org Mocha test framework http://visionmedia.github.com/mocha/ Expect.js BDD-style assertion

    toolkit https://github.com/LearnBoost/expect.js/ jsdom DOM implementation https://github.com/tmpvar/jsdom Browserify module loader https://github.com/substack/node-browserify Sinon mock library http://sinonjs.org/