Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Remove a bunch of jsdoc comments that introduced wrong output

Peter Müller82ced6cb4a12
diff --git a/lib/hook.js b/lib/hook.js
index 48798fe1..6512d0ef 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 7a54375a..17dae826 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 debfaee3..9de4763a 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 44491db9..96d97880 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 253e2215..1d238e9e 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 34bbd097..8c676dbb 100644
--- a/lib/mocha.js
+++ b/lib/mocha.js
@@ -6,7 +6,6 @@
* MIT Licensed
*/
-
var escapeRe = require('escape-string-regexp');
var path = require('path');
var reporters = require('./reporters');
@@ -54,7 +53,7 @@ exports.Test = require('./test');
/**
* Return image `name` path.
*
- * @api private
+ * @private
* @param {string} name
* @return {string}
*/
@@ -78,10 +77,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 c7801046..ecbcda33 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 7ac3161d..f212d671 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 733f1b48..0b59ea82 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
*/