Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
fix: remove the 'fileBasedReporters' property from the 'stats' object
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The 'fileBasedReporters' property has been in the 'stats' object by accident and now is removed. Apparently it has been there for a while, as it got listed in #599, the only documentation of the 'stats' object to this date.
  • Loading branch information
honzajavorek committed Apr 4, 2019
1 parent 12f13ec commit a33c4f7
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 228 deletions.
8 changes: 8 additions & 0 deletions lib/reporters/BaseReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ BaseReporter.prototype.configureEmitter = function configureEmitter(emitter) {
emitter.on('end', (callback) => {
this.stats.end = new Date();
this.stats.duration = this.stats.end - this.stats.start;

// FIXME: It looks like 'configureReporters' sneaks in this property to let
// the reporters know how many files they should expect. This obviously
// isn't ideal interface and it pollutes the 'stats' object, which is
// a part of Dredd's public interface. This line cleans it up for now, but
// ideally reporters would learn about the number of files in a nicer way.
delete this.stats.fileBasedReporters;

callback();
});

Expand Down
228 changes: 0 additions & 228 deletions test/integration/dredd-test.js

This file was deleted.

Loading

0 comments on commit a33c4f7

Please sign in to comment.