From f966c943e637eea1e05b90e6904ce3e84271d279 Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Fri, 10 Jul 2020 13:12:31 +0530 Subject: [PATCH] Fixing typos --- lib/cli/watch-run.js | 6 +++--- lib/errors.js | 4 ++-- lib/mocha.js | 6 +++--- lib/utils.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/cli/watch-run.js b/lib/cli/watch-run.js index 0fb214d92e..d36a58394e 100644 --- a/lib/cli/watch-run.js +++ b/lib/cli/watch-run.js @@ -19,7 +19,7 @@ const collectFiles = require('./collect-files'); * @param {Object} opts - Options * @param {string[]} [opts.watchFiles] - List of paths and patterns to * watch. If not provided all files with an extension included in - * `fileColletionParams.extension` are watched. See first argument of + * `fileCollectionParams.extension` are watched. See first argument of * `chokidar.watch`. * @param {string[]} opts.watchIgnore - List of paths and patterns to * exclude from watching. See `ignored` option of `chokidar`. @@ -81,7 +81,7 @@ exports.watchParallelRun = ( * @param {Object} opts - Options * @param {string[]} [opts.watchFiles] - List of paths and patterns to * watch. If not provided all files with an extension included in - * `fileColletionParams.extension` are watched. See first argument of + * `fileCollectionParams.extension` are watched. See first argument of * `chokidar.watch`. * @param {string[]} opts.watchIgnore - List of paths and patterns to * exclude from watching. See `ignored` option of `chokidar`. @@ -144,7 +144,7 @@ exports.watchRun = (mocha, {watchFiles, watchIgnore}, fileCollectParams) => { * @param {AfterWatchRun} [opts.afterRun] - Function to call after `mocha.run()` * @param {string[]} [opts.watchFiles] - List of paths and patterns to watch. If * not provided all files with an extension included in - * `fileColletionParams.extension` are watched. See first argument of + * `fileCollectionParams.extension` are watched. See first argument of * `chokidar.watch`. * @param {string[]} [opts.watchIgnore] - List of paths and patterns to exclude * from watching. See `ignored` option of `chokidar`. diff --git a/lib/errors.js b/lib/errors.js index 929f56399c..56e01c04c3 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -59,12 +59,12 @@ var constants = { UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED', /** - * Invalid state transition occuring in `Mocha` instance + * Invalid state transition occurring in `Mocha` instance */ INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING', /** - * Invalid state transition occuring in `Mocha` instance + * Invalid state transition occurring in `Mocha` instance */ INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED', diff --git a/lib/mocha.js b/lib/mocha.js index ee76ba1d50..dc18b585a5 100644 --- a/lib/mocha.js +++ b/lib/mocha.js @@ -252,7 +252,7 @@ Mocha.prototype.addFile = function(file) { * @public * @see [CLI option](../#-reporter-name-r-name) * @see [Reporters](../#reporters) - * @param {String|Function} reporter - Reporter name or constructor. + * @param {String|Function} reporterName - Reporter name or constructor. * @param {Object} [reporterOptions] - Options used to configure the reporter. * @returns {Mocha} this * @chainable @@ -775,8 +775,8 @@ Mocha.prototype.timeout = function(msecs) { * // Allow any failed test to retry one more time * mocha.retries(1); */ -Mocha.prototype.retries = function(n) { - this.suite.retries(n); +Mocha.prototype.retries = function(retry) { + this.suite.retries(retry); return this; }; diff --git a/lib/utils.js b/lib/utils.js index fa26ad609a..00d6fcc938 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -604,7 +604,7 @@ exports.defineConstants = function(obj) { * Whether current version of Node support ES modules * * @description - * Versions prior to 10 did not support ES Modules, and version 10 has an old incompatibile version of ESM. + * Versions prior to 10 did not support ES Modules, and version 10 has an old incompatible version of ESM. * This function returns whether Node.JS has ES Module supports that is compatible with Mocha's needs, * which is version >=12.11. *