diff --git a/bin/_mocha b/bin/_mocha index 63ab9a42e5..1129178b54 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) })