Some more tests

This PR could really use some more eyes, especially for the watch mode test. I'm kind of anxious of all the child_process hackery/tricks as I'm not that proficient in Node.js.

See also #1795.
Did passing in `done` as the callback not work here?  I thought it was much cleaner that way.