diff --git a/lib/frameworks/mocha.js b/lib/frameworks/mocha.js index d7d7f1d16..187bc426b 100644 --- a/lib/frameworks/mocha.js +++ b/lib/frameworks/mocha.js @@ -75,13 +75,13 @@ exports.run = function(runner, specs) { } }); + specs.forEach(function(file) { + mocha.addFile(file); + }); + mocha.loadFiles(); runner.runTestPreparer().then(function() { - specs.forEach(function(file) { - mocha.addFile(file); - }); - var testResult = []; var mochaRunner = mocha.run(function(failures) {