okfn/dashboard — pull request #27 by elemoine (2012-01-24 20:12:59+00:00)
Title: Set up js testing

This pull request suggests adding a test harness for the frontend app. More specifically, this pull request adds

- the [Jasmine](http://pivotal.github.com/jasmine/) testing framework
- the [Sinon.js](http://sinonjs.org) testing lib (for spies, stubs, etc.)
- the [jasmine-sinon.js](https://github.com/froots/jasmine-sinon>) script to ease using Jasmine and Sinon.js together
- a custom ```toBeInstanceOf``` matcher for Jasmine
- a test runner page - the page to load in the browser to run tests
- actual tests for the ```Dashboard.Member``` and ```Dashboard.MemberMapView``` classes, mostly as examples

This pull request intentionally doesn't include code refactoring - it doesn't modify the application at all. It's just about setting things up for testing. Code refactoring should occur in subsequent pull requests.

I have checked that the ```Dashboard.Member``` and ```Dashboard.MemberMapView``` tests pass in FireFox 9.0.1, Chromium 15, and IE 8.