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

Docs: remove unsupported 'no-timeout' option #4719

Merged
merged 1 commit into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -937,13 +937,13 @@ Note: A test that executes for _half_ of the "slow" time will be highlighted _in

### `--timeout <ms>, -t <ms>`

> _Update in v6.0.0: `--no-timeout` is implied when invoking Mocha using inspect flags. It is equivalent to `--timeout 0`. `--timeout 99999999` is no longer needed._
> _Update in v6.0.0: `--timeout 0` is implied when invoking Mocha using inspect flags. `--timeout 99999999` is no longer needed._

Specifies the test case timeout, defaulting to two (2) seconds (2000 milliseconds). Tests taking longer than this amount of time will be marked as failed.

To override you may pass the timeout in milliseconds, or a value with the `s` suffix, e.g., `--timeout 2s` and `--timeout 2000` are equivalent.

To disable timeouts, use `--no-timeout`.
To disable timeouts, use `--timeout 0`.

Note: synchronous (blocking) tests are also bound by the timeout, but they will not complete until the code stops blocking. Infinite loops will still be infinite loops!

Expand Down Expand Up @@ -1174,7 +1174,7 @@ Use `inspect` to launch Node.js' internal debugger.

All of these options are mutually exclusive.

Implies `--no-timeout`.
Implies `--timeout 0`.

### `--parallel, -p`

Expand Down
8 changes: 4 additions & 4 deletions example/config/.mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ module.exports = {
delay: false,
diff: true,
exit: false, // could be expressed as "'no-exit': true"
extension: ['js'],
// fgrep: something, // fgrep and grep are mutually exclusive
extension: ['js', 'cjs', 'mjs'],
fgrep: 'something', // fgrep and grep are mutually exclusive
file: ['/path/to/some/file', '/path/to/some/other/file'],
'forbid-only': false,
'forbid-pending': false,
'full-trace': false,
global: ['jQuery', '$'],
// grep: something, // fgrep and grep are mutually exclusive
grep: /something/i, // also 'something', fgrep and grep are mutually exclusive
growl: false,
ignore: ['/path/to/some/ignored/file'],
'inline-diffs': false,
Expand All @@ -38,7 +38,7 @@ module.exports = {
sort: false,
spec: ['test/**/*.spec.js'], // the positional arguments!
timeout: '2000', // same as "timeout: '2s'"
// timeout: false, // same as "'no-timeout': true" or "timeout: 0"
// timeout: false, // same as "timeout: 0"
'trace-warnings': true, // node flags ok
ui: 'bdd',
'v8-stack-trace-limit': 100, // V8 flags are prepended with "v8-"
Expand Down
9 changes: 4 additions & 5 deletions example/config/.mocharc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ color: true
delay: false
diff: true
exit: false # could be expressed as "no-exit: true"
extension:
- 'js'
extension: ['js', 'cjs', 'mjs']
# fgrep and grep are mutually exclusive
# fgrep: something
fgrep: 'something'
file:
- '/path/to/some/file'
- '/path/to/some/other/file'
Expand All @@ -21,7 +20,7 @@ global:
- 'jQuery'
- '$'
# fgrep and grep are mutually exclusive
# grep: something
grep: '/something/i' # also 'something'
growl: false
ignore:
- '/path/to/some/ignored/file'
Expand All @@ -45,7 +44,7 @@ sort: false
spec:
- 'test/**/*.spec.js' # the positional arguments!
timeout: '2000' # same as "timeout: '2s'"
# timeout: false # same as "no-timeout: true" or "timeout: 0"
# timeout: false # same as "timeout: 0"
trace-warnings: true # node flags ok
ui: 'bdd'
v8-stack-trace-limit: 100 # V8 flags are prepended with "v8-"
Expand Down