Skip to content

Commit

Permalink
workaround for karma-runner/karma#1292
Browse files Browse the repository at this point in the history
  • Loading branch information
segrey committed Jan 28, 2015
1 parent c6c2fd3 commit 7652a2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/intellijReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ var cli = require("./intellijCli.js")

function getOrCreateBrowserNode(tree, browser) {
var configFileNode = tree.configFileNode;
if (configFileNode == null) {
console.log("botva")
}
var browserNode = configFileNode.findChildNodeByKey(browser.id);
if (!browserNode) {
browserNode = configFileNode.addChildWithKey(browser.id, browser.name, true, 'browser', null);
Expand Down Expand Up @@ -214,6 +217,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;
Expand Down

0 comments on commit 7652a2d

Please sign in to comment.