cameron/squirt — pull request #68 by clarkf (2014-03-13 18:55:00+00:00)
Title: Automated Test Suite

Hey All,

I'm opening this PR as the foundation for a test suite. I've added [mocha](http://visionmedia.github.io/mocha/) as the test runner, and [chai](http://chaijs.com/) for assertions.

To run the test suite

1. At the root directory, run `jekyll serve --watch` (you're probably already doing this)
2. Navigate to [http://localhost:4000/test/](http://localhost:4000/test/)

You'll notice that weird stuff happens now (Squirt starts reading the output of the test runner, or, sometimes, just gives up). This is because Squirt doesn't reveal its API, so it's pretty difficult to unit test anything, or event prevent Squirt from running upon being loaded.

We need to add some sort of point-of-entry to Squirt -- perhaps we can make a subset of the API 'public' (i.e. accessible from outside of the main closure), and change the bookmarklet to invoke the 'start' method? In pseudocode:

_bookmarklet.js_:

```js
document.body.appendChild(/*