Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the number of concurrent job with --parallel option in mocha:cli:run:helpers #4416

Merged
merged 3 commits into from
Oct 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/cli/run-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

const fs = require('fs');
const path = require('path');
const workerpool = require('workerpool');
const debug = require('debug')('mocha:cli:run:helpers');
const {watchRun, watchParallelRun} = require('./watch-run');
const collectFiles = require('./collect-files');
Expand Down Expand Up @@ -175,7 +176,7 @@ const parallelRun = async (mocha, options, fileCollectParams) => {
debug(
'executing %d test file(s) across %d concurrent jobs',
files.length,
options.jobs
options.jobs ? options.jobs : workerpool.cpus - 1
Copy link
Member

@boneskull boneskull Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just remove the job count. It's printed in the debug logs elsewhere:

debug(
'run(): starting worker pool of max size %d, using node args: %s',
maxWorkers,
process.execArgv.join(' ')
);

maybe just say executing %d test file(s) in parallel mode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed your feedback. I removed options.jobs params and added text in parallel mode.
Thank you for your comment.

);
mocha.files = files;

Expand Down