Skip to content

Commit

Permalink
docs: remove unsupported 'no-timeout' option (#4719) [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba authored Aug 13, 2021
1 parent 9f82ccb commit f19d3ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
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

0 comments on commit f19d3ca

Please sign in to comment.