Watch file changes #22

FrederikNS opened this Issue Nov 21, 2012 · 4 comments

5 participants


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.

@metaskills metaskills closed this Nov 22, 2012

+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.

@nathanboktae nathanboktae reopened this Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment