Skip to content

Commit

Permalink
fix(timeouts): should call special timeout handlers only for a jasmin…
Browse files Browse the repository at this point in the history
…e timeout

Previously, it used to call the resets if anything matched 'timeout'. This was too
vague, since many error messages contain that string.

Closes #8
  • Loading branch information
juliemr committed Jul 18, 2014
1 parent 3b14e27 commit a088e6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ OnTimeoutReporter.prototype.reportSpecResults = function(spec) {
if (result.getItems()[i].passed_ === false) {
failureItem = result.getItems()[i];

if (failureItem.toString().match(/timeout/)) {
var jasmineTimeoutRegexp =
/timed out after \d+ msec waiting for spec to complete/;
if (failureItem.toString().match(jasmineTimeoutRegexp)) {
this.callback();
}
}
Expand Down

0 comments on commit a088e6f

Please sign in to comment.