Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Reset context for each --watch triggered run.

Benjie Gillam18c06ae79b1d
diff --git a/bin/_mocha b/bin/_mocha
index bf5fa058..d5aeaff5 100644
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -328,6 +328,7 @@ if (program.watch) {
purge();
stop()
mocha.suite = mocha.suite.clone();
+ mocha.suite.ctx = new Mocha.Context;
mocha.ui(program.ui);
loadAndRun();
});