Skip to content

Commit

Permalink
Improve failures summary header #13
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaudan committed Aug 12, 2014
1 parent 160937f commit 07b01fa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions spec/jasmine-spec-reporter.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ describe 'spec reporter', ->
@it 'spec 2', ->
@failed('failed assertion 2')
).summary).contains [
'Failures:'
/.*/
/Failures/
/.*/
''
'1) suite 1 spec 1'
' Message:'
Expand Down Expand Up @@ -224,7 +226,9 @@ describe 'spec reporter', ->
@it 'spec 2', ->
@failed('failed assertion 2')
).summary).contains [
'Failures:'
/.*/
/Failures/
/.*/
''
'1) suite 1 spec 1'
' Message:'
Expand Down
2 changes: 1 addition & 1 deletion spec/test-helper.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Test
logInSummary = false
console.log = (stuff) =>
stuff = stuff.stripColors.stripTime
logInSummary = true if /^(Executed|Failures)/.test stuff
logInSummary = true if /^(Executed|\*\*\*\*\*\*\*)/.test stuff

unless logInSummary
@outputs.push stuff
Expand Down
4 changes: 3 additions & 1 deletion src/jasmine-spec-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ SpecDisplay.prototype = {
},

failuresSummary: function () {
this.log("Failures:");
this.log("**************************************************");
this.log("* Failures *");
this.log("**************************************************");
this.newLine();
for (var i = 0 ; i < this.failedSpecs.length ; i++) {
this.failedSummary(this.failedSpecs[i], i + 1);
Expand Down

0 comments on commit 07b01fa

Please sign in to comment.