From 0eb8e8347d493a5b5a8bf9dcc7b89b41558340e1 Mon Sep 17 00:00:00 2001 From: stoicchild Date: Sun, 30 Aug 2020 23:20:47 +0900 Subject: [PATCH] fixed variable in runMocha --- lib/cli/run-helpers.js | 5 +++-- lib/mocha.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cli/run-helpers.js b/lib/cli/run-helpers.js index 6c76851b22..c46e0d16fe 100644 --- a/lib/cli/run-helpers.js +++ b/lib/cli/run-helpers.js @@ -195,17 +195,17 @@ const parallelRun = async (mocha, options, fileCollectParams) => { * @returns {Promise} */ exports.runMocha = async (mocha, options) => { - let { + const { watch = false, extension = [], ignore = [], file = [], - parallel = false, recursive = false, sort = false, spec = [], parallelForce = false } = options; + let {parallel} = options; const fileCollectParams = { ignore, @@ -223,6 +223,7 @@ exports.runMocha = async (mocha, options) => { parallel = false; } } + let run; if (watch) { run = parallel ? watchParallelRun : watchRun; diff --git a/lib/mocha.js b/lib/mocha.js index 350df62dbc..4bd9a874b7 100644 --- a/lib/mocha.js +++ b/lib/mocha.js @@ -123,6 +123,7 @@ exports.Test = require('./test'); * @param {number|string} [options.timeout] - Timeout threshold value. * @param {string} [options.ui] - Interface name. * @param {boolean} [options.parallel] - Run jobs in parallel + * @param {boolean} [options.parallelForce] - Run jobs in parallel * @param {number} [options.jobs] - Max number of worker processes for parallel runs * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root * suite with