Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Scope loading behaviour instead of using early return

Guy Arye952dca73d1c2
diff --git a/bin/_mocha b/bin/_mocha
index 63ab9a42..1129178b 100755
--- a/bin/_mocha
+++ b/bin/_mocha
@@ -393,13 +393,14 @@ if (program.watch) {
}
});
- return;
-}
+} else {
// load
-mocha.files = files;
-runner = mocha.run(program.exit ? exit : exitLater);
+ mocha.files = files;
+ runner = mocha.run(program.exit ? exit : exitLater);
+
+}
function exitLater(code) {
process.on('exit', function() { process.exit(code) })