Skip to content

Commit

Permalink
fix - prevent execute method from overriding configureDefaultReporter
Browse files Browse the repository at this point in the history
- remove provideFallbackReporter since it is no longer used
- prevent execute method from overriding configureDefaultReporter

closes jasmine#95
  • Loading branch information
cnishina committed Oct 28, 2016
1 parent 6f58487 commit 0ee6e09
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ Jasmine.prototype.addReporter = function(reporter) {
this.reportersCount++;
};

Jasmine.prototype.provideFallbackReporter = function(reporter) {
this.env.provideFallbackReporter(reporter);
};

Jasmine.prototype.configureDefaultReporter = function(options) {
options.timer = options.timer || new this.jasmine.Timer();
options.print = options.print || function() {
Expand Down Expand Up @@ -157,7 +153,9 @@ Jasmine.prototype.exitCodeCompletion = function(passed) {

Jasmine.prototype.execute = function(files, filterString) {
this.loadHelpers();
this.configureDefaultReporter({ showColors: this.showingColors });
if(this.reportersCount === 0) {
this.configureDefaultReporter({ showColors: this.showingColors });
}

if(filterString) {
var specFilter = new ConsoleSpecFilter({
Expand Down

0 comments on commit 0ee6e09

Please sign in to comment.