visionmedia/mocha — pull request #1147 by mshiltonj (2014-03-06 11:48:43+00:00)
Title: work w/ grunt-cafemocha & grunt-contrib-watch w/ spawn: false

* with 'spawn: false' as a grunt-config-watch config,
all loading of test files after the
first run do not re-create the test suites while
requiring the test files, zero tests get run after the first
time suite is run.
Need to clear the test file out of the require cache.

Here is a Gruntfile watch config I was using...

watch: {
testing: {
files: ["controllers/*.js", "test/**/*.js", "models/**/*.js", "routes/**/*.js", "public/js/**/*.js"],
tasks: ["cafemocha"],
options: {
spawn: false
}
}
}

Thanks!