Skip to content

Commit fd8c0e7

Browse files
committed
Remove globals in api docs
1 parent 9d4a8ec commit fd8c0e7

File tree

10 files changed

+39
-0
lines changed

10 files changed

+39
-0
lines changed

lib/browser/progress.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module Progress
5+
*/
6+
37
/**
48
* Expose `Progress`.
59
*/

lib/cli/collect-files.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ module.exports = ({ignore, extension, file, recursive, sort, spec} = {}) => {
8181

8282
/**
8383
* An object to configure how Mocha gathers test files
84+
* @private
8485
* @typedef {Object} FileCollectionOptions
8586
* @property {string[]} extension - File extensions to use
8687
* @property {string[]} spec - Files, dirs, globs to run

lib/interfaces/common.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module common
5+
*/
6+
37
var Suite = require('../suite');
48
var errors = require('../errors');
59
var createMissingArgumentError = errors.createMissingArgumentError;
@@ -9,6 +13,7 @@ var createForbiddenExclusivityError = errors.createForbiddenExclusivityError;
913
/**
1014
* Functions common to more than one interface.
1115
*
16+
* @private
1217
* @param {Suite[]} suites
1318
* @param {Context} context
1419
* @param {Mocha} mocha

lib/mocha.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,28 @@ exports = module.exports = Mocha;
3535
/**
3636
* A Mocha instance is a finite state machine.
3737
* These are the states it can be in.
38+
* @private
3839
*/
3940
var mochaStates = utils.defineConstants({
4041
/**
4142
* Initial state of the mocha instance
43+
* @private
4244
*/
4345
INIT: 'init',
4446
/**
4547
* Mocha instance is running tests
48+
* @private
4649
*/
4750
RUNNING: 'running',
4851
/**
4952
* Mocha instance is done running tests and references to test functions and hooks are cleaned.
5053
* You can reset this state by unloading the test files.
54+
* @private
5155
*/
5256
REFERENCES_CLEANED: 'referencesCleaned',
5357
/**
5458
* Mocha instance is disposed and can no longer be used.
59+
* @private
5560
*/
5661
DISPOSED: 'disposed'
5762
});
@@ -67,6 +72,7 @@ if (!utils.isBrowser() && typeof module.paths !== 'undefined') {
6772

6873
/**
6974
* Expose internals.
75+
* @private
7076
*/
7177

7278
exports.utils = utils;
@@ -921,6 +927,7 @@ Object.defineProperty(Mocha.prototype, 'version', {
921927
/**
922928
* Callback to be invoked when test execution is complete.
923929
*
930+
* @private
924931
* @callback DoneCB
925932
* @param {number} failures - Number of failures that occurred.
926933
*/
@@ -1091,6 +1098,7 @@ Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {
10911098

10921099
/**
10931100
* An alternative way to define root hooks that works with parallel runs.
1101+
* @private
10941102
* @typedef {Object} MochaRootHookObject
10951103
* @property {Function|Function[]} [beforeAll] - "Before all" hook(s)
10961104
* @property {Function|Function[]} [beforeEach] - "Before each" hook(s)
@@ -1100,6 +1108,7 @@ Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {
11001108

11011109
/**
11021110
* An function that returns a {@link MochaRootHookObject}, either sync or async.
1111+
* @private
11031112
* @callback MochaRootHookFunction
11041113
* @returns {MochaRootHookObject|Promise<MochaRootHookObject>}
11051114
*/

lib/nodejs/parallel-buffered-runner.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,14 @@ module.exports = ParallelBufferedRunner;
281281

282282
/**
283283
* Listener function intended to be bound to `Process.SIGINT` event
284+
* @private
284285
* @callback SigIntListener
285286
* @returns {Promise<void>}
286287
*/
287288

288289
/**
289290
* A function accepting a test file path and returning the results of a test run
291+
* @private
290292
* @callback FileRunner
291293
* @param {string} filename - File to run
292294
* @returns {Promise<SerializedWorkerResult>}

lib/nodejs/serializer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ exports.SerializableWorkerResult = SerializableWorkerResult;
387387
/**
388388
* The result of calling `SerializableEvent.serialize`, as received
389389
* by the deserializer.
390+
* @private
390391
* @typedef {Object} SerializedEvent
391392
* @property {object?} data - Optional serialized data
392393
* @property {object?} error - Optional serialized `Error`
@@ -395,6 +396,7 @@ exports.SerializableWorkerResult = SerializableWorkerResult;
395396
/**
396397
* The result of calling `SerializableWorkerResult.serialize` as received
397398
* by the deserializer.
399+
* @private
398400
* @typedef {Object} SerializedWorkerResult
399401
* @property {number} failureCount - Number of failures
400402
* @property {SerializedEvent[]} events - Serialized events

lib/pending.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module Pending
5+
*/
6+
37
module.exports = Pending;
48

59
/**

lib/runnable.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module Runnable
5+
*/
6+
37
var EventEmitter = require('events').EventEmitter;
48
var Pending = require('./pending');
59
var debug = require('debug')('mocha:runnable');

lib/runner.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module Runner
5+
*/
6+
37
/**
48
* Module dependencies.
59
*/

lib/suite.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
/**
4+
@module Suite
5+
*/
6+
37
/**
48
* Module dependencies.
59
*/

0 commit comments

Comments
 (0)