From bc5029482b96779b04639bd8dc8b642b10734186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCller?= Date: Sun, 15 Apr 2018 00:15:53 +0200 Subject: [PATCH] Remove a bunch of jsdoc comments that introduced wrong output --- lib/hook.js | 17 +++-------------- lib/interfaces/bdd.js | 6 +----- lib/interfaces/exports.js | 5 ----- lib/interfaces/qunit.js | 6 +----- lib/interfaces/tdd.js | 4 ---- lib/mocha.js | 4 +--- lib/pending.js | 4 ---- lib/runnable.js | 17 +---------------- lib/test.js | 12 ++---------- 9 files changed, 9 insertions(+), 66 deletions(-) diff --git a/lib/hook.js b/lib/hook.js index 48798fe145..6512d0ef0a 100644 --- a/lib/hook.js +++ b/lib/hook.js @@ -1,11 +1,4 @@ 'use strict'; -/** - * @module Hook - * - */ -/** - * Module dependencies. - */ var Runnable = require('./runnable'); var inherits = require('./utils').inherits; @@ -17,15 +10,12 @@ var inherits = require('./utils').inherits; module.exports = Hook; /** - * Initialize a new `Hook` with the given `title` and callback `fn`. Derived from - * `Runnable`. + * Initialize a new `Hook` with the given `title` and callback `fn` * - * @memberof Mocha - * @public * @class + * @extends Runnable * @param {String} title * @param {Function} fn - * @api private */ function Hook (title, fn) { Runnable.call(this, title, fn); @@ -40,11 +30,10 @@ inherits(Hook, Runnable); /** * Get or set the test `err`. * - * @memberof Mocha.Hook + * @memberof Hook * @public * @param {Error} err * @return {Error} - * @api public */ Hook.prototype.error = function (err) { if (!arguments.length) { diff --git a/lib/interfaces/bdd.js b/lib/interfaces/bdd.js index 7a54375a94..66883fe958 100644 --- a/lib/interfaces/bdd.js +++ b/lib/interfaces/bdd.js @@ -1,9 +1,5 @@ 'use strict'; -/** - * Module dependencies. - */ - var Test = require('../test'); /** @@ -23,7 +19,7 @@ var Test = require('../test'); * * @param {Suite} suite Root suite. */ -module.exports = function (suite) { +module.exports = function bddInterface(suite) { var suites = [suite]; suite.on('pre-require', function (context, file, mocha) { diff --git a/lib/interfaces/exports.js b/lib/interfaces/exports.js index debfaee3b8..9de4763aa2 100644 --- a/lib/interfaces/exports.js +++ b/lib/interfaces/exports.js @@ -1,9 +1,4 @@ 'use strict'; - -/** - * Module dependencies. - */ - var Suite = require('../suite'); var Test = require('../test'); diff --git a/lib/interfaces/qunit.js b/lib/interfaces/qunit.js index 44491db926..7bd92f3dcd 100644 --- a/lib/interfaces/qunit.js +++ b/lib/interfaces/qunit.js @@ -1,9 +1,5 @@ 'use strict'; -/** - * Module dependencies. - */ - var Test = require('../test'); /** @@ -31,7 +27,7 @@ var Test = require('../test'); * * @param {Suite} suite Root suite. */ -module.exports = function (suite) { +module.exports = function qUnitInterface(suite) { var suites = [suite]; suite.on('pre-require', function (context, file, mocha) { diff --git a/lib/interfaces/tdd.js b/lib/interfaces/tdd.js index 253e221575..1d238e9eab 100644 --- a/lib/interfaces/tdd.js +++ b/lib/interfaces/tdd.js @@ -1,9 +1,5 @@ 'use strict'; -/** - * Module dependencies. - */ - var Test = require('../test'); /** diff --git a/lib/mocha.js b/lib/mocha.js index 9a1af7e9c4..8c1d99987f 100644 --- a/lib/mocha.js +++ b/lib/mocha.js @@ -54,7 +54,7 @@ exports.Test = require('./test'); /** * Return image `name` path. * - * @api private + * @private * @param {string} name * @return {string} */ @@ -78,10 +78,8 @@ function image (name) { * - `fullTrace` display the full stack-trace on failing * - `grep` string or regexp to filter tests with * - * @public * @class Mocha * @param {Object} options - * @api public */ function Mocha (options) { options = options || {}; diff --git a/lib/pending.js b/lib/pending.js index c780104610..ecbcda33e9 100644 --- a/lib/pending.js +++ b/lib/pending.js @@ -1,9 +1,5 @@ 'use strict'; -/** - * Expose `Pending`. - */ - module.exports = Pending; /** diff --git a/lib/runnable.js b/lib/runnable.js index 7ac3161d81..f212d6715b 100644 --- a/lib/runnable.js +++ b/lib/runnable.js @@ -1,10 +1,4 @@ 'use strict'; -/** - * @module Runnable - */ -/** - * Module dependencies. - */ var EventEmitter = require('events').EventEmitter; var Pending = require('./pending'); var debug = require('debug')('mocha:runnable'); @@ -23,24 +17,15 @@ var clearTimeout = global.clearTimeout; var clearInterval = global.clearInterval; /* eslint-enable no-unused-vars, no-native-reassign */ -/** - * Object#toString(). - */ - var toString = Object.prototype.toString; -/** - * Expose `Runnable`. - */ - module.exports = Runnable; /** * Initialize a new `Runnable` with the given `title` and callback `fn`. Derived from [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) * - * @memberof Mocha - * @public * @class + * @extends EventEmitter * @param {String} title * @param {Function} fn */ diff --git a/lib/test.js b/lib/test.js index 733f1b48c3..0b59ea82cd 100644 --- a/lib/test.js +++ b/lib/test.js @@ -1,23 +1,15 @@ 'use strict'; - -/** - * Module dependencies. - */ - var Runnable = require('./runnable'); var utils = require('./utils'); var isString = utils.isString; -/** - * Expose `Test`. - */ - module.exports = Test; /** * Initialize a new `Test` with the given `title` and callback `fn`. * - * @api private + * @class + * @extends Runnable * @param {String} title * @param {Function} fn */