Skip to content

armgit / mocha

Public Imported from GitHub
0

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

Fixing typos

Sri Harshaf966c943e637
diff --git a/lib/cli/watch-run.js b/lib/cli/watch-run.js
index 0fb214d9..d36a5839 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 929f5639..56e01c04 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 ee76ba1d..dc18b585 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 fa26ad60..00d6fcc9 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.
*