Skip to content

Commit

Permalink
handle undefined result.description
Browse files Browse the repository at this point in the history
  • Loading branch information
segrey committed Nov 16, 2013
1 parent 319df16 commit ee844c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/intellijReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ function IntellijReporter(config, fileList, formatError, globalEmitter, injector
};

this.onSpecComplete = function (browser, result) {
var suiteNames = result.suite
, specName = result.description;
if (specName == null) {
return;
}
var browserNode = getOrCreateBrowserNode(tree, browser);
if (typeof browserNode.checkedForTotalTestCount === 'undefined') {
browserNode.checkedForTotalTestCount = true;
Expand All @@ -186,8 +191,8 @@ function IntellijReporter(config, fileList, formatError, globalEmitter, injector
tree.write('##teamcity[testCount count=\'' + totalTestCount + '\']\n');
}
}
var suiteNode = getOrCreateLowerSuiteNode(browserNode, result.suite, write);
var specNode = createSpecNode(suiteNode, result.suite, result.description);
var suiteNode = getOrCreateLowerSuiteNode(browserNode, suiteNames, write);
var specNode = createSpecNode(suiteNode, suiteNames, specName);
var status;
if (result.skipped) {
status = 1;
Expand Down

0 comments on commit ee844c2

Please sign in to comment.