Skip to content

Commit

Permalink
cli option added: force parallel in running a single file
Browse files Browse the repository at this point in the history
  • Loading branch information
stoicchild8910 committed Aug 29, 2020
1 parent b064b58 commit 7a66dc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/cli/run-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ exports.runMocha = async (mocha, options) => {
parallel = false,
recursive = false,
sort = false,
spec = []
spec = [],
parallelForce = false
} = options;

const fileCollectParams = {
Expand Down
3 changes: 2 additions & 1 deletion lib/cli/run-option-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const TYPES = (exports.types = {
'parallel',
'recursive',
'sort',
'watch'
'watch',
'parallelForce'
],
number: ['retries', 'jobs'],
string: [
Expand Down
4 changes: 4 additions & 0 deletions lib/cli/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ exports.builder = yargs =>
requiresArg: true,
coerce: list,
default: defaults['watch-ignore']
},
parallelForce: {
description: 'Force Mocha to quit after tests complete',
group: GROUPS.RULES,
}
})
.positional('spec', {
Expand Down

0 comments on commit 7a66dc4

Please sign in to comment.