added initial suite value for the root suite in the mocha_reporter, in case a hook fails before the first suite is loaded

test/mocha_multi_reporter.js
This commit is contained in:
Spencer Alger
2013-11-13 16:29:11 -07:00
parent f8a34df5ae
commit 5e7e437162
3 changed files with 4 additions and 2 deletions

View File

@ -233,7 +233,7 @@ module.exports = function (grunt) {
// creates browser_tests:{{browser}} tasks, for the browsers listed directly above
Object.keys(browsers).forEach(function (browser) {
var appName = browsers[browser][process.platform];
// on other platforms, open expects app to be the name of the executable...
// on other platforms, open expects app to be the name of the executale...
if (!appName && process.platform !== 'darwin' && process.platform !== 'win32') {
appName = browsers[browser].executable;
}

View File

@ -34,7 +34,8 @@
var stats = this.stats;
var rootSuite = {
$el: $('<ul id="mocha-report"></ul>'),
results: []
results: [],
suites: []
};

View File

@ -33,6 +33,7 @@
mocha.checkLeaks();
mocha.slow(1000);
mocha.timeout(11000);
mocha.globals(['console', 'elasticsearch']);
mocha.bail();
/PhantomJS/i.test(navigator.userAgent) || mocha.run();
</script>