Skip to content

Commit

Permalink
Fix "Cannot read property 'length' of undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
killzoner authored and bcaudan committed Aug 15, 2017
1 parent 625de92 commit f971298
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spec-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class SpecReporter implements CustomReporter {

public jasmineDone(runDetails: RunDetails): void {
this.metrics.stop(runDetails);
if (runDetails.failedExpectations.length) {
if (runDetails.failedExpectations && runDetails.failedExpectations.length) {
const error = this.runDetailsToResult(runDetails);
this.metrics.globalErrors.push(error);
this.display.failed(error);
Expand Down

0 comments on commit f971298

Please sign in to comment.