From 793d5f53573f42698182c5ee4a31efdc307f423a Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Thu, 29 Nov 2018 13:57:28 -0800 Subject: [PATCH] remove unsupported @api tag in docstrings --- lib/browser/progress.js | 6 +++--- lib/context.js | 14 ++++++------- lib/reporters/base.js | 17 +++++++--------- lib/reporters/doc.js | 1 - lib/reporters/dot.js | 1 - lib/reporters/html.js | 1 - lib/reporters/json.js | 7 +++---- lib/reporters/landing.js | 1 - lib/reporters/list.js | 1 - lib/reporters/markdown.js | 1 - lib/reporters/min.js | 1 - lib/reporters/nyan.js | 21 ++++++++++---------- lib/reporters/progress.js | 1 - lib/reporters/spec.js | 1 - lib/reporters/xunit.js | 1 - lib/runnable.js | 23 ++++++++++----------- lib/runner.js | 42 +++++++++++++++++---------------------- lib/suite.js | 32 +++++++++++++---------------- lib/utils.js | 34 +++++++++++++++---------------- 19 files changed, 89 insertions(+), 117 deletions(-) diff --git a/lib/browser/progress.js b/lib/browser/progress.js index 7bf400b58e..553fc6eb56 100644 --- a/lib/browser/progress.js +++ b/lib/browser/progress.js @@ -19,7 +19,7 @@ function Progress() { /** * Set progress size to `size`. * - * @api public + * @public * @param {number} size * @return {Progress} Progress instance. */ @@ -31,7 +31,7 @@ Progress.prototype.size = function(size) { /** * Set text to `text`. * - * @api public + * @public * @param {string} text * @return {Progress} Progress instance. */ @@ -43,7 +43,7 @@ Progress.prototype.text = function(text) { /** * Set font size to `size`. * - * @api public + * @public * @param {number} size * @return {Progress} Progress instance. */ diff --git a/lib/context.js b/lib/context.js index 812162b137..4c6b0c23e5 100644 --- a/lib/context.js +++ b/lib/context.js @@ -11,14 +11,14 @@ module.exports = Context; /** * Initialize a new `Context`. * - * @api private + * @private */ function Context() {} /** * Set or get the context `Runnable` to `runnable`. * - * @api private + * @private * @param {Runnable} runnable * @return {Context} context */ @@ -33,7 +33,7 @@ Context.prototype.runnable = function(runnable) { /** * Set or get test timeout `ms`. * - * @api private + * @private * @param {number} ms * @return {Context} self */ @@ -48,7 +48,7 @@ Context.prototype.timeout = function(ms) { /** * Set test timeout `enabled`. * - * @api private + * @private * @param {boolean} enabled * @return {Context} self */ @@ -63,7 +63,7 @@ Context.prototype.enableTimeouts = function(enabled) { /** * Set or get test slowness threshold `ms`. * - * @api private + * @private * @param {number} ms * @return {Context} self */ @@ -78,7 +78,7 @@ Context.prototype.slow = function(ms) { /** * Mark a test as skipped. * - * @api private + * @private * @throws Pending */ Context.prototype.skip = function() { @@ -88,7 +88,7 @@ Context.prototype.skip = function() { /** * Set or get a number of allowed retries on failed tests * - * @api private + * @private * @param {number} n * @return {Context} self */ diff --git a/lib/reporters/base.js b/lib/reporters/base.js index b26bc5d07c..e7b93b24b8 100644 --- a/lib/reporters/base.js +++ b/lib/reporters/base.js @@ -105,7 +105,7 @@ if (process.platform === 'win32') { * @param {string} type * @param {string} str * @return {string} - * @api private + * @private */ var color = (exports.color = function(type, str) { if (!exports.useColors) { @@ -198,7 +198,6 @@ var generateDiff = (exports.generateDiff = function(actual, expected) { * @memberof Mocha.reporters.Base * @variation 1 * @param {Array} failures - * @api public */ exports.list = function(failures) { @@ -279,7 +278,6 @@ exports.list = function(failures) { * @public * @class * @param {Runner} runner - * @api public */ function Base(runner) { @@ -353,7 +351,6 @@ function Base(runner) { * * @memberof Mocha.reporters.Base * @public - * @api public */ Base.prototype.epilogue = function() { var stats = this.stats; @@ -392,7 +389,7 @@ Base.prototype.epilogue = function() { /** * Pad the given `str` to `len`. * - * @api private + * @private * @param {string} str * @param {string} len * @return {string} @@ -405,7 +402,7 @@ function pad(str, len) { /** * Returns an inline diff between 2 strings with coloured ANSI output. * - * @api private + * @private * @param {String} actual * @param {String} expected * @return {string} Diff @@ -442,7 +439,7 @@ function inlineDiff(actual, expected) { /** * Returns a unified diff between two strings with coloured ANSI output. * - * @api private + * @private * @param {String} actual * @param {String} expected * @return {string} The diff. @@ -485,7 +482,7 @@ function unifiedDiff(actual, expected) { /** * Return a character diff for `err`. * - * @api private + * @private * @param {String} actual * @param {String} expected * @return {string} the diff @@ -508,7 +505,7 @@ function errorDiff(actual, expected) { /** * Color lines for `str`, using the color `name`. * - * @api private + * @private * @param {string} name * @param {string} str * @return {string} @@ -530,7 +527,7 @@ var objToString = Object.prototype.toString; /** * Check that a / b have the same type. * - * @api private + * @private * @param {Object} a * @param {Object} b * @return {boolean} diff --git a/lib/reporters/doc.js b/lib/reporters/doc.js index 5cb0bda8fc..8e043fd9be 100644 --- a/lib/reporters/doc.js +++ b/lib/reporters/doc.js @@ -23,7 +23,6 @@ exports = module.exports = Doc; * @extends {Base} * @public * @param {Runner} runner - * @api public */ function Doc(runner) { Base.call(this, runner); diff --git a/lib/reporters/dot.js b/lib/reporters/dot.js index e4b1d96193..5d20c8855e 100644 --- a/lib/reporters/dot.js +++ b/lib/reporters/dot.js @@ -22,7 +22,6 @@ exports = module.exports = Dot; * @memberof Mocha.reporters * @extends Mocha.reporters.Base * @public - * @api public * @param {Runner} runner */ function Dot(runner) { diff --git a/lib/reporters/html.js b/lib/reporters/html.js index 85a5b1b19f..52b63b6051 100644 --- a/lib/reporters/html.js +++ b/lib/reporters/html.js @@ -53,7 +53,6 @@ var playIcon = '‣'; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function HTML(runner) { diff --git a/lib/reporters/json.js b/lib/reporters/json.js index 046e4ba4a5..6d36f55f4a 100644 --- a/lib/reporters/json.js +++ b/lib/reporters/json.js @@ -21,7 +21,6 @@ exports = module.exports = JSONReporter; * @class JSON * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function JSONReporter(runner) { @@ -68,7 +67,7 @@ function JSONReporter(runner) { * Return a plain-object representation of `test` * free of cyclic properties etc. * - * @api private + * @private * @param {Object} test * @return {Object} */ @@ -90,7 +89,7 @@ function clean(test) { /** * Replaces any circular references inside `obj` with '[object Object]' * - * @api private + * @private * @param {Object} obj * @return {Object} */ @@ -114,7 +113,7 @@ function cleanCycles(obj) { /** * Transform an Error object into a JSON object. * - * @api private + * @private * @param {Error} err * @return {Object} */ diff --git a/lib/reporters/landing.js b/lib/reporters/landing.js index b0a9fb23be..b382a7263b 100644 --- a/lib/reporters/landing.js +++ b/lib/reporters/landing.js @@ -42,7 +42,6 @@ Base.colors.runway = 90; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function Landing(runner) { diff --git a/lib/reporters/list.js b/lib/reporters/list.js index 29ce74ab79..52cc3af051 100644 --- a/lib/reporters/list.js +++ b/lib/reporters/list.js @@ -24,7 +24,6 @@ exports = module.exports = List; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function List(runner) { diff --git a/lib/reporters/markdown.js b/lib/reporters/markdown.js index ff75ee4d67..a5e4d427f0 100644 --- a/lib/reporters/markdown.js +++ b/lib/reporters/markdown.js @@ -28,7 +28,6 @@ exports = module.exports = Markdown; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function Markdown(runner) { diff --git a/lib/reporters/min.js b/lib/reporters/min.js index 2a91a3c1e2..e2140313fe 100644 --- a/lib/reporters/min.js +++ b/lib/reporters/min.js @@ -22,7 +22,6 @@ exports = module.exports = Min; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function Min(runner) { diff --git a/lib/reporters/nyan.js b/lib/reporters/nyan.js index 164a3fadc4..7c9ac7395e 100644 --- a/lib/reporters/nyan.js +++ b/lib/reporters/nyan.js @@ -19,7 +19,6 @@ exports = module.exports = NyanCat; * Initialize a new `Dot` matrix test reporter. * * @param {Runner} runner - * @api public * @public * @class Nyan * @memberof Mocha.reporters @@ -75,7 +74,7 @@ inherits(NyanCat, Base); /** * Draw the nyan cat * - * @api private + * @private */ NyanCat.prototype.draw = function() { @@ -90,7 +89,7 @@ NyanCat.prototype.draw = function() { * Draw the "scoreboard" showing the number * of passes, failures and pending tests. * - * @api private + * @private */ NyanCat.prototype.drawScoreboard = function() { @@ -113,7 +112,7 @@ NyanCat.prototype.drawScoreboard = function() { /** * Append the rainbow. * - * @api private + * @private */ NyanCat.prototype.appendRainbow = function() { @@ -132,7 +131,7 @@ NyanCat.prototype.appendRainbow = function() { /** * Draw the rainbow. * - * @api private + * @private */ NyanCat.prototype.drawRainbow = function() { @@ -150,7 +149,7 @@ NyanCat.prototype.drawRainbow = function() { /** * Draw the nyan cat * - * @api private + * @private */ NyanCat.prototype.drawNyanCat = function() { var self = this; @@ -184,7 +183,7 @@ NyanCat.prototype.drawNyanCat = function() { /** * Draw nyan cat face. * - * @api private + * @private * @return {string} */ @@ -203,7 +202,7 @@ NyanCat.prototype.face = function() { /** * Move cursor up `n`. * - * @api private + * @private * @param {number} n */ @@ -214,7 +213,7 @@ NyanCat.prototype.cursorUp = function(n) { /** * Move cursor down `n`. * - * @api private + * @private * @param {number} n */ @@ -225,7 +224,7 @@ NyanCat.prototype.cursorDown = function(n) { /** * Generate rainbow colors. * - * @api private + * @private * @return {Array} */ NyanCat.prototype.generateColors = function() { @@ -246,7 +245,7 @@ NyanCat.prototype.generateColors = function() { /** * Apply rainbow to the given `str`. * - * @api private + * @private * @param {string} str * @return {string} */ diff --git a/lib/reporters/progress.js b/lib/reporters/progress.js index 042fc1b91b..c2041aae72 100644 --- a/lib/reporters/progress.js +++ b/lib/reporters/progress.js @@ -30,7 +30,6 @@ Base.colors.progress = 90; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner * @param {Object} options */ diff --git a/lib/reporters/spec.js b/lib/reporters/spec.js index 75e6dda1b5..1324eb26fd 100644 --- a/lib/reporters/spec.js +++ b/lib/reporters/spec.js @@ -23,7 +23,6 @@ exports = module.exports = Spec; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function Spec(runner) { diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js index bd89a37e76..881c87f631 100644 --- a/lib/reporters/xunit.js +++ b/lib/reporters/xunit.js @@ -39,7 +39,6 @@ exports = module.exports = XUnit; * @class * @memberof Mocha.reporters * @extends Mocha.reporters.Base - * @api public * @param {Runner} runner */ function XUnit(runner, options) { diff --git a/lib/runnable.js b/lib/runnable.js index 81d9ec57ed..ab9a79a9fb 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -98,7 +98,7 @@ Runnable.prototype.timeout = function(ms) { /** * Set or get slow `ms`. * - * @api private + * @private * @param {number|string} ms * @return {Runnable|number} ms or Runnable instance. */ @@ -117,7 +117,7 @@ Runnable.prototype.slow = function(ms) { /** * Set and get whether timeout is `enabled`. * - * @api private + * @private * @param {boolean} enabled * @return {Runnable|boolean} enabled or Runnable instance. */ @@ -135,7 +135,6 @@ Runnable.prototype.enableTimeouts = function(enabled) { * * @memberof Mocha.Runnable * @public - * @api public */ Runnable.prototype.skip = function() { throw new Pending('sync skip'); @@ -144,7 +143,7 @@ Runnable.prototype.skip = function() { /** * Check if this runnable or its parent suite is marked as pending. * - * @api private + * @private */ Runnable.prototype.isPending = function() { return this.pending || (this.parent && this.parent.isPending()); @@ -171,7 +170,7 @@ Runnable.prototype.isPassed = function() { /** * Set or get number of retries. * - * @api private + * @private */ Runnable.prototype.retries = function(n) { if (!arguments.length) { @@ -183,7 +182,7 @@ Runnable.prototype.retries = function(n) { /** * Set or get current retry * - * @api private + * @private */ Runnable.prototype.currentRetry = function(n) { if (!arguments.length) { @@ -198,7 +197,6 @@ Runnable.prototype.currentRetry = function(n) { * * @memberof Mocha.Runnable * @public - * @api public * @return {string} */ Runnable.prototype.fullTitle = function() { @@ -210,7 +208,6 @@ Runnable.prototype.fullTitle = function() { * * @memberof Mocha.Runnable * @public - * @api public * @return {string} */ Runnable.prototype.titlePath = function() { @@ -220,7 +217,7 @@ Runnable.prototype.titlePath = function() { /** * Clear the timeout. * - * @api private + * @private */ Runnable.prototype.clearTimeout = function() { clearTimeout(this.timer); @@ -229,7 +226,7 @@ Runnable.prototype.clearTimeout = function() { /** * Inspect the runnable void of private properties. * - * @api private + * @private * @return {string} */ Runnable.prototype.inspect = function() { @@ -254,7 +251,7 @@ Runnable.prototype.inspect = function() { /** * Reset the timeout. * - * @api private + * @private */ Runnable.prototype.resetTimeout = function() { var self = this; @@ -276,7 +273,7 @@ Runnable.prototype.resetTimeout = function() { /** * Set or get a list of whitelisted globals for this test run. * - * @api private + * @private * @param {string[]} globals */ Runnable.prototype.globals = function(globals) { @@ -290,7 +287,7 @@ Runnable.prototype.globals = function(globals) { * Run the test and invoke `fn(err)`. * * @param {Function} fn - * @api private + * @private */ Runnable.prototype.run = function(fn) { var self = this; diff --git a/lib/runner.js b/lib/runner.js index dc2092f9fa..15f5e40172 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -58,7 +58,6 @@ module.exports = Runner; * @memberof Mocha * @public * @class - * @api public * @param {Suite} [suite] Root suite * @param {boolean} [delay] Whether or not to delay execution of root suite * until ready. @@ -87,7 +86,7 @@ function Runner(suite, delay) { * Wrapper for setImmediate, process.nextTick, or browser polyfill. * * @param {Function} fn - * @api private + * @private */ Runner.immediately = global.setImmediate || process.nextTick; @@ -100,7 +99,6 @@ inherits(Runner, EventEmitter); * Run tests with full titles matching `re`. Updates runner.total * with number of tests matched. * - * @api public * @public * @memberof Mocha.Runner * @param {RegExp} re @@ -120,7 +118,6 @@ Runner.prototype.grep = function(re, invert) { * given suite. * * @memberof Mocha.Runner - * @api public * @public * @param {Suite} suite * @return {number} @@ -146,7 +143,7 @@ Runner.prototype.grepTotal = function(suite) { * Return a list of global properties. * * @return {Array} - * @api private + * @private */ Runner.prototype.globalProps = function() { var props = Object.keys(global); @@ -165,7 +162,6 @@ Runner.prototype.globalProps = function() { /** * Allow the given `arr` of globals. * - * @api public * @public * @memberof Mocha.Runner * @param {Array} arr @@ -183,7 +179,7 @@ Runner.prototype.globals = function(arr) { /** * Check for global variable leaks. * - * @api private + * @private */ Runner.prototype.checkGlobals = function(test) { if (this.ignoreLeaks) { @@ -219,7 +215,7 @@ Runner.prototype.checkGlobals = function(test) { /** * Fail the given `test`. * - * @api private + * @private * @param {Test} test * @param {Error} err */ @@ -264,7 +260,7 @@ Runner.prototype.fail = function(test, err) { * suite and subsuites, but executes other `after each` * hooks * - * @api private + * @private * @param {Hook} hook * @param {Error} err */ @@ -281,7 +277,7 @@ Runner.prototype.failHook = function(hook, err) { /** * Run hook `name` callbacks and then invoke `fn()`. * - * @api private + * @private * @param {string} name * @param {Function} fn */ @@ -346,7 +342,7 @@ Runner.prototype.hook = function(name, fn) { * Run hook `name` for the given array of `suites` * in order, and callback `fn(err, errSuite)`. * - * @api private + * @private * @param {string} name * @param {Array} suites * @param {Function} fn @@ -382,7 +378,7 @@ Runner.prototype.hooks = function(name, suites, fn) { * * @param {String} name * @param {Function} fn - * @api private + * @private */ Runner.prototype.hookUp = function(name, fn) { var suites = [this.suite].concat(this.parents()).reverse(); @@ -394,7 +390,7 @@ Runner.prototype.hookUp = function(name, fn) { * * @param {String} name * @param {Function} fn - * @api private + * @private */ Runner.prototype.hookDown = function(name, fn) { var suites = [this.suite].concat(this.parents()); @@ -406,7 +402,7 @@ Runner.prototype.hookDown = function(name, fn) { * closest to furthest. * * @return {Array} - * @api private + * @private */ Runner.prototype.parents = function() { var suite = this.suite; @@ -422,7 +418,7 @@ Runner.prototype.parents = function() { * Run the current test and callback `fn(err)`. * * @param {Function} fn - * @api private + * @private */ Runner.prototype.runTest = function(fn) { var self = this; @@ -455,7 +451,7 @@ Runner.prototype.runTest = function(fn) { /** * Run tests in the given `suite` and invoke the callback `fn()` when complete. * - * @api private + * @private * @param {Suite} suite * @param {Function} fn */ @@ -621,7 +617,7 @@ function alwaysFalse() { /** * Run the given `suite` and invoke the callback `fn()` when complete. * - * @api private + * @private * @param {Suite} suite * @param {Function} fn */ @@ -708,7 +704,7 @@ Runner.prototype.runSuite = function(suite, fn) { * Handle uncaught exceptions. * * @param {Error} err - * @api private + * @private */ Runner.prototype.uncaught = function(err) { if (err) { @@ -829,7 +825,6 @@ function cleanSuiteReferences(suite) { * Run the root suite and invoke `fn(failures)` * on completion. * - * @api public * @public * @memberof Mocha.Runner * @param {Function} fn @@ -895,7 +890,6 @@ Runner.prototype.run = function(fn) { * * @memberof Mocha.Runner * @public - * @api public * @return {Runner} Runner instance. */ Runner.prototype.abort = function() { @@ -910,7 +904,7 @@ Runner.prototype.abort = function() { * * @param {Array} suite * @returns {Boolean} - * @api private + * @private */ function filterOnly(suite) { if (suite._onlyTests.length) { @@ -943,7 +937,7 @@ function filterOnly(suite) { * * @param {Array} suite * @returns {Boolean} - * @api private + * @private */ function hasOnly(suite) { return ( @@ -956,7 +950,7 @@ function hasOnly(suite) { /** * Filter leaks with the given globals flagged as `ok`. * - * @api private + * @private * @param {Array} ok * @param {Array} globals * @return {Array} @@ -1026,7 +1020,7 @@ function thrown2Error(err) { * Array of globals dependent on the environment. * * @return {Array} - * @api private + * @private */ function extraGlobals() { if (typeof process === 'object' && typeof process.version === 'string') { diff --git a/lib/suite.js b/lib/suite.js index b80681ddc4..482a47925b 100644 --- a/lib/suite.js +++ b/lib/suite.js @@ -26,7 +26,6 @@ exports = module.exports = Suite; * * @memberof Mocha * @public - * @api public * @param {Suite} parent * @param {string} title * @return {Suite} @@ -86,7 +85,7 @@ inherits(Suite, EventEmitter); /** * Return a clone of this `Suite`. * - * @api private + * @private * @return {Suite} */ Suite.prototype.clone = function() { @@ -104,7 +103,7 @@ Suite.prototype.clone = function() { /** * Set or get timeout `ms` or short-hand such as "2s". * - * @api private + * @private * @param {number|string} ms * @return {Suite|number} for chaining */ @@ -126,7 +125,7 @@ Suite.prototype.timeout = function(ms) { /** * Set or get number of times to retry a failed test. * - * @api private + * @private * @param {number|string} n * @return {Suite|number} for chaining */ @@ -142,7 +141,7 @@ Suite.prototype.retries = function(n) { /** * Set or get timeout to `enabled`. * - * @api private + * @private * @param {boolean} enabled * @return {Suite|boolean} self or enabled */ @@ -158,7 +157,7 @@ Suite.prototype.enableTimeouts = function(enabled) { /** * Set or get slow `ms` or short-hand such as "2s". * - * @api private + * @private * @param {number|string} ms * @return {Suite|number} for chaining */ @@ -177,7 +176,7 @@ Suite.prototype.slow = function(ms) { /** * Set or get whether to bail after first error. * - * @api private + * @private * @param {boolean} bail * @return {Suite|number} for chaining */ @@ -193,7 +192,7 @@ Suite.prototype.bail = function(bail) { /** * Check if this suite or its parent suite is marked as pending. * - * @api private + * @private */ Suite.prototype.isPending = function() { return this.pending || (this.parent && this.parent.isPending()); @@ -221,7 +220,7 @@ Suite.prototype._createHook = function(title, fn) { /** * Run `fn(test[, done])` before running tests. * - * @api private + * @private * @param {string} title * @param {Function} fn * @return {Suite} for chaining @@ -245,7 +244,7 @@ Suite.prototype.beforeAll = function(title, fn) { /** * Run `fn(test[, done])` after running tests. * - * @api private + * @private * @param {string} title * @param {Function} fn * @return {Suite} for chaining @@ -269,7 +268,7 @@ Suite.prototype.afterAll = function(title, fn) { /** * Run `fn(test[, done])` before each test case. * - * @api private + * @private * @param {string} title * @param {Function} fn * @return {Suite} for chaining @@ -293,7 +292,7 @@ Suite.prototype.beforeEach = function(title, fn) { /** * Run `fn(test[, done])` after each test case. * - * @api private + * @private * @param {string} title * @param {Function} fn * @return {Suite} for chaining @@ -317,7 +316,7 @@ Suite.prototype.afterEach = function(title, fn) { /** * Add a test `suite`. * - * @api private + * @private * @param {Suite} suite * @return {Suite} for chaining */ @@ -336,7 +335,7 @@ Suite.prototype.addSuite = function(suite) { /** * Add a `test` to this suite. * - * @api private + * @private * @param {Test} test * @return {Suite} for chaining */ @@ -358,7 +357,6 @@ Suite.prototype.addTest = function(test) { * * @memberof Mocha.Suite * @public - * @api public * @return {string} */ Suite.prototype.fullTitle = function() { @@ -371,7 +369,6 @@ Suite.prototype.fullTitle = function() { * * @memberof Mocha.Suite * @public - * @api public * @return {string} */ Suite.prototype.titlePath = function() { @@ -390,7 +387,6 @@ Suite.prototype.titlePath = function() { * * @memberof Mocha.Suite * @public - * @api public * @return {number} */ Suite.prototype.total = function() { @@ -405,7 +401,7 @@ Suite.prototype.total = function() { * Iterates through each suite recursively to find all tests. Applies a * function in the format `fn(test)`. * - * @api private + * @private * @param {Function} fn * @return {Suite} */ diff --git a/lib/utils.js b/lib/utils.js index 6e78a99b71..bb0fa355dc 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -26,7 +26,7 @@ exports.inherits = require('util').inherits; /** * Escape special characters in the given string of html. * - * @api private + * @private * @param {string} html * @return {string} */ @@ -37,7 +37,7 @@ exports.escape = function(html) { /** * Test if the given obj is type of string. * - * @api private + * @private * @param {Object} obj * @return {boolean} */ @@ -49,7 +49,7 @@ exports.isString = function(obj) { * Watch the given `files` for changes * and invoke `fn(file)` on modification. * - * @api private + * @private * @param {Array} files * @param {Function} fn */ @@ -68,7 +68,7 @@ exports.watch = function(files, fn) { /** * Ignored files. * - * @api private + * @private * @param {string} path * @return {boolean} */ @@ -79,7 +79,7 @@ function ignored(path) { /** * Lookup files in the given `dir`. * - * @api private + * @private * @param {string} dir * @param {string[]} [ext=['.js']] * @param {Array} [ret=[]] @@ -109,7 +109,7 @@ exports.files = function(dir, ext, ret) { /** * Compute a slug from the given `str`. * - * @api private + * @private * @param {string} str * @return {string} */ @@ -151,7 +151,7 @@ exports.clean = function(str) { /** * Parse the given `qs`. * - * @api private + * @private * @param {string} qs * @return {Object} */ @@ -174,7 +174,7 @@ exports.parseQuery = function(qs) { /** * Highlight the given string of `js`. * - * @api private + * @private * @param {string} js * @return {string} */ @@ -199,7 +199,7 @@ function highlight(js) { /** * Highlight the contents of tag `name`. * - * @api private + * @private * @param {string} name */ exports.highlightTags = function(name) { @@ -218,7 +218,7 @@ exports.highlightTags = function(name) { * Objects w/ no properties return `'{}'` * All else: return result of `value.toString()` * - * @api private + * @private * @param {*} value The value to inspect. * @param {string} typeHint The type of the value * @returns {string} @@ -240,7 +240,7 @@ function emptyRepresentation(value, typeHint) { * Takes some variable and asks `Object.prototype.toString()` what it thinks it * is. * - * @api private + * @private * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString * @param {*} value The value to test. * @returns {string} Computed type @@ -281,7 +281,7 @@ var type = (exports.type = function type(value) { * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of * JSON.stringify(). * - * @api private + * @private * @see exports.type * @param {*} value * @return {string} @@ -327,7 +327,7 @@ exports.stringify = function(value) { /** * like JSON.stringify but more sense. * - * @api private + * @private * @param {Object} object * @param {number=} spaces * @param {number=} depth @@ -422,7 +422,7 @@ function jsonStringify(object, spaces, depth) { * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` * - * @api private + * @private * @see {@link exports.stringify} * @param {*} value Thing to inspect. May or may not have properties. * @param {Array} [stack=[]] Stack of seen values @@ -501,10 +501,10 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { * * @memberof Mocha.utils * @public - * @api public * @param {string} filepath Base path to start searching from. * @param {string[]} extensions File extensions to look for. * @param {boolean} recursive Whether or not to recurse into subdirectories. + * @todo Fix extension handling * @return {string[]} An array of paths. */ exports.lookupFiles = function lookupFiles(filepath, extensions, recursive) { @@ -683,7 +683,7 @@ exports.stackTraceFilter = function() { /** * Crude, but effective. - * @api + * @public * @param {*} value * @returns {boolean} Whether or not `value` is a Promise */ @@ -704,6 +704,6 @@ exports.clamp = function clamp(value, range) { /** * It's a noop. - * @api + * @public */ exports.noop = function() {};