Skip to content

armgit / mocha

Public Imported from GitHub
0

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

docs: clarify CLI option help and parallel errors (#6167)

Hashim Khan6fc8a8377a51
diff --git a/docs/src/content/docs/running/cli.mdx b/docs/src/content/docs/running/cli.mdx
index 5ad6484f..2af9c8ee 100644
--- a/docs/src/content/docs/running/cli.mdx
+++ b/docs/src/content/docs/running/cli.mdx
@@ -17,7 +17,7 @@ Commands:
Options:
--extension File extension(s) to load
--file Specify file(s) to be loaded prior to root suite execution
- --global, --globals List of allowed global variables
+ --global, --globals List allowed global variables
--ignore, --exclude Ignore file(s) or glob pattern(s)
--node-option, -n Node or V8 option (no leading "--")
--reporter-option, --reporter-options, -O Reporter-specific options (<k=v,[k1=v1,..]>)
@@ -34,7 +34,7 @@ Options:
--dry-run Report tests without executing them
--exit Force Mocha to quit after tests complete
--fail-hook-affected-tests Report tests as failed when affected by hook failures (before/beforeEach)
- --pass-on-failing-test-suite Not fail test run if tests were failed
+ --pass-on-failing-test-suite Pass test run if only error is test failures
--fail-zero Fail test run if no test(s) encountered
--forbid-only Fail if exclusive test(s) encountered
--forbid-pending Fail if pending test(s) encountered
diff --git a/lib/cli/run-option-metadata.cjs b/lib/cli/run-option-metadata.cjs
index b19fee0d..d688bab3 100644
--- a/lib/cli/run-option-metadata.cjs
+++ b/lib/cli/run-option-metadata.cjs
@@ -112,13 +112,13 @@ const descriptions = {
"fail-hook-affected-tests":
"Report tests as failed when affected by hook failures (before/beforeEach)",
"fail-zero": "Fail test run if no test(s) encountered",
- "pass-on-failing-test-suite": "Not fail test run if tests were failed",
+ "pass-on-failing-test-suite": "Pass test run if only error is test failures",
fgrep: "Only run tests containing this string",
file: "Specify file(s) to be loaded prior to root suite execution",
"forbid-only": "Fail if exclusive test(s) encountered",
"forbid-pending": "Fail if pending test(s) encountered",
"full-trace": "Display full stack traces",
- global: "List of allowed global variables",
+ global: "List allowed global variables",
grep: "Only run tests matching this string or regexp",
ignore: "Ignore file(s) or glob pattern(s)",
"inline-diffs":
diff --git a/lib/cli/run.cjs b/lib/cli/run.cjs
index d872a420..c9ed2195 100644
--- a/lib/cli/run.cjs
+++ b/lib/cli/run.cjs
@@ -104,13 +104,13 @@ const validateRunOptions = (argv) => {
if (argv.parallel) {
if (argv.file) {
throw createUnsupportedError(
- "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --file",
+ "--parallel is mutually exclusive with --file",
);
}
if (argv.sort) {
throw createUnsupportedError(
- "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --sort",
+ "--parallel is mutually exclusive with --sort",
);
}