Skip to content

Commit

Permalink
options.reporterOptions are used for progress reporter
Browse files Browse the repository at this point in the history
Progress reporter had multiple options for configuring the reporter,
but it needed the optional fields under `options` object, while
those fields are provided under `options.reporterOptions`.
This commit enables usage of optional fields from `reporterOptions`.
  • Loading branch information
Can Oztokmak authored and boneskull committed Dec 14, 2017
1 parent 33b7ea6 commit 78b686f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/reporters/progress.js
Expand Up @@ -39,11 +39,13 @@ function Progress (runner, options) {

// default chars
options = options || {};
options.open = options.open || '[';
options.complete = options.complete || '▬';
options.incomplete = options.incomplete || Base.symbols.dot;
options.close = options.close || ']';
options.verbose = false;
var reporterOptions = options.reporterOptions || {};

options.open = reporterOptions.open || '[';
options.complete = reporterOptions.complete || '▬';
options.incomplete = reporterOptions.incomplete || Base.symbols.dot;
options.close = reporterOptions.close || ']';
options.verbose = reporterOptions.verbose || false;

// tests started
runner.on('start', function () {
Expand Down

0 comments on commit 78b686f

Please sign in to comment.