Zombie.js
Zombie.js is a fast, headless testing framework that provides various functionality to write tests that hit your full technology stack. While I generally prefer to write more fine-grained, isolated tests, it's important to also have a few smoke tests and/or integration tests to verify end-to-end functionality. Zombie makes these kinds of tests easy, while allowing me to still use ExpectThat and Mocha.
The Example
Here's a simple example that populates two input elements and then verifies that the values of those input fields contain the expected text.
You can find the full example here.
After a few commands such as " coffee --output lib/ specs/ " and " mocha 'lib/example.spec.js' --reporter spec ", you should see an output that looks something like this:
![ZombieExampleScreenShot](http://freshbrewedcode.com/danmohl/files/2012/02/Screen-Shot-2012-02-19-at-7.32.46-AM.png)
To learn more about ExpectThat, visit https://github.com/dmohl/expectThat.
You could setup Guard in order to automatically build the specs and possibly even to run mocha on those specs ;)
ReplyDelete