Vanilla JS

Check for PhantomJS userAgent in a test html file and run tests only in a real browser (see example/test/test2.html for details).

In this case you shouldn't include mocha-helper.js (it will be included automatically) and tests will be run from mocha-helper.js.

Alternatively, include mocha-helper.js from tasks/mocha after you include mocha.js and run mocha.setup in your HTML file. The helper will override mocha.setup if it detects PhantomJS. See example/test/test.html.

PhantomJS

Mocha

Maybe Growl?

Growl support is optional. I'm not sure what the Windows situation is with growl.

Hacks

The PhantomJS -> Grunt superdimensional conduit uses alert. If you have disabled or aliased alert in your app, this won't work. I have conveniently set a global PHANTOMJS on window so you can conditionally override alert in your app.