by Pocha (@pocha-codelearn) on Monday, 22 July 2013

+9
Vote on this proposal
Status: Submitted
Section
Crisp Talk

Technical level
Beginner

Objective

The regular BDD options in Node.js do not work with websockets. There is a pretty easy hack which nobody seems to be talking about.

Description

There are regular BDD solutions for Node.js - Zombie.js & PhantomJS are two popular approaches. Neither of it works if your Node.js app uses websockets ( Dont have stats but IMHO every Node.js app has websocket client talking to it for real-time communication).

In that case, there is neat hack by segregating HTML & JS, use jsdom Node.js module to import HTML & directly import the JS. It gets pretty easier to do BDD then. Pretty nifty hack.

Come to the session for a more hands-on session with an example app. Checkout a full-fledged app built using the same approach at http://github.com/pocha/terminal-codelearn

Speaker bio

I am founder of Rails Tutorial site Codelearn, my 3rd venture. I was a PHP coder in my older avatar, Rails guy in current & would be embracing more of Node.js in future.

I have philosophy of less gyan & more work. The same is emulated on Codelearn & I try to keep things as succinct & to the point as possible in my talks as well.