From 5e7e4371627024fd3b2007037c4aed4081df0daa Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Wed, 13 Nov 2013 16:29:11 -0700 Subject: [PATCH] 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 --- Gruntfile.js | 2 +- test/browser_integration/esjs_reporter.js | 3 ++- test/browser_integration/index.html | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ad0b0a4ad..e06b51bc5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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; } diff --git a/test/browser_integration/esjs_reporter.js b/test/browser_integration/esjs_reporter.js index 9aed1c42a..db5cbd39c 100644 --- a/test/browser_integration/esjs_reporter.js +++ b/test/browser_integration/esjs_reporter.js @@ -34,7 +34,8 @@ var stats = this.stats; var rootSuite = { $el: $(''), - results: [] + results: [], + suites: [] }; diff --git a/test/browser_integration/index.html b/test/browser_integration/index.html index 5a112a80f..b0f6e2969 100644 --- a/test/browser_integration/index.html +++ b/test/browser_integration/index.html @@ -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();