Skip to content

Commit 78b686f

Browse files
Can Oztokmakboneskull
Can Oztokmak
authored andcommitted
options.reporterOptions are used for progress reporter
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`.
1 parent 33b7ea6 commit 78b686f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/reporters/progress.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ function Progress (runner, options) {
3939

4040
// default chars
4141
options = options || {};
42-
options.open = options.open || '[';
43-
options.complete = options.complete || '▬';
44-
options.incomplete = options.incomplete || Base.symbols.dot;
45-
options.close = options.close || ']';
46-
options.verbose = false;
42+
var reporterOptions = options.reporterOptions || {};
43+
44+
options.open = reporterOptions.open || '[';
45+
options.complete = reporterOptions.complete || '▬';
46+
options.incomplete = reporterOptions.incomplete || Base.symbols.dot;
47+
options.close = reporterOptions.close || ']';
48+
options.verbose = reporterOptions.verbose || false;
4749

4850
// tests started
4951
runner.on('start', function () {

0 commit comments

Comments
 (0)