Unit Testing a jQuery Plugin with CoffeeScript and Pavlov

added by rcash
9/6/2011 9:33:17 AM

296 Views

There seems to be few examples of writing unit tests/specs in CoffeeScript on the web. This post, shows a very simple jQuery plugin with Pavlov specs.


1 comments

dpeterson
9/6/2011 10:03:33 AM
I enjoy using BDD rather than TDD when possible (read: when it makes sense). I was unaware of Pavlov until now, and the syntax allowed by using coffeescript rather than vanilla javascript makes the code read much better.
I was previously torn on whether I considered it useful to learn and use coffeescript rather than writing in plain javascript, but I think afte seeing this Pavlov example I'm convinced ;)