mocha-phantomjs
mocha-phantomjs copied to clipboard
Watch file changes
I would love a feature to run mocha-phantomjs in watch-mode, such that it automatically runs all the tests when I save a file.
Mocha has this functionality built in with the -w parameter, but of course this does not work with mocha tests in a html harness.
I think that falls outside of the domain of this even tho mocha does have that feature. I think most people will find that Cakefile's or using Grunt would suffice better and be able to accomplish much more. For instance, I was going to write a html5 sortable plugin and wrote up this grunt.js file to watch my files and do what I needed. In my case, run cake test:all
. Check out my project here for some hints and ideas.
https://github.com/metaskills/html5_sortable
+1 Would be nice to have, sometimes you just want to quick spin up tests without having to dig into build scripts.
I can see that. One thing to note is that mocha-phantomjs
can't know about what files you need to watch, but the same thing is true for browser sync that I've been using a lot lately, and I just pass it a glob of files to watch.
+1