candy-chat/candy — pull request #289 by benlangfeld (2014-08-06 16:08:47+00:00)
Title: Run unit tests in NodeJS to avoid browser dependency

Currently breaks on the following error:

```
TypeError: Cannot read property 'defaultView' of undefined
at Sizzle.setDocument (/Users/ben/code/candy/bower_components/jquery/dist/jquery.js:1015:15)
```

Anyone aware of the solution to this? I figure it has something to do with this:

```
// For CommonJS and CommonJS-like environments where a proper window is present,
// execute the factory and get jQuery
// For environments that do not inherently posses a window with a document
// (such as Node.js), expose a jQuery-making factory as module.exports
// This accentuates the need for the creation of a real window
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info
```