From 0b7bdc96872cdc06c0f70c62b5e9ecdb28263f74 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Wed, 28 Jan 2015 15:40:57 +0300 Subject: [PATCH] workaround for https://github.com/karma-runner/karma/issues/1292 (cherry picked from commit 8e3cdcf) --- .../src/js_reporter/karma-intellij/lib/intellijReporter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js-karma/src/js_reporter/karma-intellij/lib/intellijReporter.js b/js-karma/src/js_reporter/karma-intellij/lib/intellijReporter.js index 078ef1ad8d4..80eb5821408 100644 --- a/js-karma/src/js_reporter/karma-intellij/lib/intellijReporter.js +++ b/js-karma/src/js_reporter/karma-intellij/lib/intellijReporter.js @@ -214,6 +214,11 @@ function IntellijReporter(config, fileList, formatError, globalEmitter, injector if (specName == null) { return; } + if (tree == null) { + // workaround for https://github.com/karma-runner/karma/issues/1292 + process.stdout.write('Test "' + suiteNames.concat(specName).join('.') + '" skipped\n'); + return; + } var browserNode = getOrCreateBrowserNode(tree, browser); if (typeof browserNode.checkedForTotalTestCount === 'undefined') { browserNode.checkedForTotalTestCount = true;