@@ -92,10 +92,10 @@ if (process.platform === 'win32') {
9292 * as well as user-defined color
9393 * schemes.
9494 *
95+ * @private
9596 * @param {string } type
9697 * @param {string } str
9798 * @return {string }
98- * @private
9999 */
100100var color = ( exports . color = function ( type , str ) {
101101 if ( ! exports . useColors ) {
@@ -168,7 +168,8 @@ function stringifyDiffObjs(err) {
168168/**
169169 * Returns a diff between 2 strings with coloured ANSI output.
170170 *
171- * The diff will be either inline or unified dependant on the value
171+ * @description
172+ * The diff will be either inline or unified dependent on the value
172173 * of `Base.inlineDiff`.
173174 *
174175 * @param {string } actual
@@ -182,14 +183,14 @@ var generateDiff = (exports.generateDiff = function(actual, expected) {
182183} ) ;
183184
184185/**
185- * Output the given `failures` as a list.
186+ * Outputs the given `failures` as a list.
186187 *
187188 * @public
188189 * @memberof Mocha.reporters.Base
189190 * @variation 1
190- * @param {Array } failures
191+ * @param {Object[] } failures - Each is Test instance with corresponding
192+ * Error property
191193 */
192-
193194exports . list = function ( failures ) {
194195 console . log ( ) ;
195196 failures . forEach ( function ( test , i ) {
@@ -257,25 +258,26 @@ exports.list = function(failures) {
257258} ;
258259
259260/**
260- * Initialize a new `Base` reporter.
261+ * Constructs a new `Base` reporter instance .
261262 *
262- * All other reporters generally
263- * inherit from this reporter.
263+ * @description
264+ * All other reporters generally inherit from this reporter.
264265 *
265- * @memberof Mocha.reporters
266266 * @public
267267 * @class
268- * @param {Runner } runner
268+ * @memberof Mocha.reporters
269+ * @param {Runner } runner - Instance triggers reporter actions.
270+ * @param {Object } [options] - runner options
269271 */
270-
271- function Base ( runner ) {
272+ function Base ( runner , options ) {
272273 var failures = ( this . failures = [ ] ) ;
273274
274275 if ( ! runner ) {
275276 throw new TypeError ( 'Missing runner argument' ) ;
276277 }
277- this . stats = runner . stats ; // assigned so Reporters keep a closer reference
278+ this . options = options || { } ;
278279 this . runner = runner ;
280+ this . stats = runner . stats ; // assigned so Reporters keep a closer reference
279281
280282 runner . on ( EVENT_TEST_PASS , function ( test ) {
281283 if ( test . duration > test . slow ( ) ) {
@@ -297,11 +299,10 @@ function Base(runner) {
297299}
298300
299301/**
300- * Output common epilogue used by many of
301- * the bundled reporters.
302+ * Outputs common epilogue used by many of the bundled reporters.
302303 *
303- * @memberof Mocha.reporters.Base
304304 * @public
305+ * @memberof Mocha.reporters.Base
305306 */
306307Base . prototype . epilogue = function ( ) {
307308 var stats = this . stats ;
@@ -338,7 +339,7 @@ Base.prototype.epilogue = function() {
338339} ;
339340
340341/**
341- * Pad the given `str` to `len`.
342+ * Pads the given `str` to `len`.
342343 *
343344 * @private
344345 * @param {string } str
@@ -351,7 +352,7 @@ function pad(str, len) {
351352}
352353
353354/**
354- * Returns an inline diff between 2 strings with coloured ANSI output.
355+ * Returns inline diff between 2 strings with coloured ANSI output.
355356 *
356357 * @private
357358 * @param {String } actual
@@ -388,7 +389,7 @@ function inlineDiff(actual, expected) {
388389}
389390
390391/**
391- * Returns a unified diff between two strings with coloured ANSI output.
392+ * Returns unified diff between two strings with coloured ANSI output.
392393 *
393394 * @private
394395 * @param {String } actual
@@ -431,7 +432,7 @@ function unifiedDiff(actual, expected) {
431432}
432433
433434/**
434- * Return a character diff for `err`.
435+ * Returns character diff for `err`.
435436 *
436437 * @private
437438 * @param {String } actual
@@ -454,7 +455,7 @@ function errorDiff(actual, expected) {
454455}
455456
456457/**
457- * Color lines for `str`, using the color `name`.
458+ * Colors lines for `str`, using the color `name`.
458459 *
459460 * @private
460461 * @param {string } name
@@ -476,7 +477,7 @@ function colorLines(name, str) {
476477var objToString = Object . prototype . toString ;
477478
478479/**
479- * Check that a / b have the same type.
480+ * Checks that a / b have the same type.
480481 *
481482 * @private
482483 * @param {Object } a
0 commit comments