Skip to content

Commit f19d3ca

Browse files
authoredAug 13, 2021
docs: remove unsupported 'no-timeout' option (#4719) [ci skip]
1 parent 9f82ccb commit f19d3ca

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed
 

‎docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -937,13 +937,13 @@ Note: A test that executes for _half_ of the "slow" time will be highlighted _in
937937

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

940-
> _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._
940+
> _Update in v6.0.0: `--timeout 0` is implied when invoking Mocha using inspect flags. `--timeout 99999999` is no longer needed._
941941
942942
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.
943943

944944
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.
945945

946-
To disable timeouts, use `--no-timeout`.
946+
To disable timeouts, use `--timeout 0`.
947947

948948
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!
949949

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

11751175
All of these options are mutually exclusive.
11761176

1177-
Implies `--no-timeout`.
1177+
Implies `--timeout 0`.
11781178

11791179
### `--parallel, -p`
11801180

‎example/config/.mocharc.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ module.exports = {
1313
delay: false,
1414
diff: true,
1515
exit: false, // could be expressed as "'no-exit': true"
16-
extension: ['js'],
17-
// fgrep: something, // fgrep and grep are mutually exclusive
16+
extension: ['js', 'cjs', 'mjs'],
17+
fgrep: 'something', // fgrep and grep are mutually exclusive
1818
file: ['/path/to/some/file', '/path/to/some/other/file'],
1919
'forbid-only': false,
2020
'forbid-pending': false,
2121
'full-trace': false,
2222
global: ['jQuery', '$'],
23-
// grep: something, // fgrep and grep are mutually exclusive
23+
grep: /something/i, // also 'something', fgrep and grep are mutually exclusive
2424
growl: false,
2525
ignore: ['/path/to/some/ignored/file'],
2626
'inline-diffs': false,
@@ -38,7 +38,7 @@ module.exports = {
3838
sort: false,
3939
spec: ['test/**/*.spec.js'], // the positional arguments!
4040
timeout: '2000', // same as "timeout: '2s'"
41-
// timeout: false, // same as "'no-timeout': true" or "timeout: 0"
41+
// timeout: false, // same as "timeout: 0"
4242
'trace-warnings': true, // node flags ok
4343
ui: 'bdd',
4444
'v8-stack-trace-limit': 100, // V8 flags are prepended with "v8-"

‎example/config/.mocharc.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ color: true
77
delay: false
88
diff: true
99
exit: false # could be expressed as "no-exit: true"
10-
extension:
11-
- 'js'
10+
extension: ['js', 'cjs', 'mjs']
1211
# fgrep and grep are mutually exclusive
13-
# fgrep: something
12+
fgrep: 'something'
1413
file:
1514
- '/path/to/some/file'
1615
- '/path/to/some/other/file'
@@ -21,7 +20,7 @@ global:
2120
- 'jQuery'
2221
- '$'
2322
# fgrep and grep are mutually exclusive
24-
# grep: something
23+
grep: '/something/i' # also 'something'
2524
growl: false
2625
ignore:
2726
- '/path/to/some/ignored/file'
@@ -45,7 +44,7 @@ sort: false
4544
spec:
4645
- 'test/**/*.spec.js' # the positional arguments!
4746
timeout: '2000' # same as "timeout: '2s'"
48-
# timeout: false # same as "no-timeout: true" or "timeout: 0"
47+
# timeout: false # same as "timeout: 0"
4948
trace-warnings: true # node flags ok
5049
ui: 'bdd'
5150
v8-stack-trace-limit: 100 # V8 flags are prepended with "v8-"

0 commit comments

Comments
 (0)
Please sign in to comment.