Skip to content

Commit

Permalink
feat: fail if zero tests executed
Browse files Browse the repository at this point in the history
Closes #468
  • Loading branch information
vojtajina committed Jul 2, 2013
1 parent 6b27fee commit 5670415
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ var Browser = function(id, collection, emitter) {

this.isReady = true;
this.lastResult.totalTimeEnd();

if (!this.lastResult.success) {
this.lastResult.error = true;
}

emitter.emit('browsers_change', this);
emitter.emit('browser_complete', this, result);
};
Expand Down
7 changes: 7 additions & 0 deletions test/unit/browser.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ describe 'browser', ->
expect(browser.lastResult.totalTime).to.equal 2


it 'should error the result if zero tests executed', ->
browser.isReady = false
browser.onComplete()

expect(browser.lastResult.error).to.equal true


#==========================================================================
# browser.Browser.onDisconnect
#==========================================================================
Expand Down

0 comments on commit 5670415

Please sign in to comment.