jenius/roots — pull request #474 by jenius (2014-05-27 16:24:36+00:00)
Title: Roots.watch refactor and integration tests

So this is a fairly large commit here, let me try to cover what is going on here.

First, since `roots.compile` returns a promise, the promise is actually rejected if the roots compile fails, in addition to emitting an error event. While this is a small change, it has a pretty far-reaching impact. Also this refactors the `watch` command behave the same way, returning a rejected promise if there's a compile error. This caused changes to be necessary in the extension failures section, since all of them throw rejections, and allowed a few bugs to be fixed up.

On top of the refactored watch implementation, there is the start of an integration test for the browser functionality. It uses selenium with phantomjs (easily switched for chrome if you want to see it happen live) to run watch, open a browser, change a file, confirm that the browser has reloaded, change the file again to include an error, ensure that the error appears in-browser, then close out. This should help to add a lot of coverage to an area which has never been covered at all in any version of roots because it's so difficult to test.