You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bb2e69a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/content/docs/blog/mocha-12-stable.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,13 @@ Those new minimum versions are intentionally the lowest Node.js versions that su
37
37
We intentionally chose those versions so that programmatic integrators can continue to `require("mocha")`, though we do recommend updating to ECMAScript Modules (ESM) if possible.
38
38
39
39
Accordingly, Mocha's minimum supported browser versions are those that were stable as of [Node.js 20.0.0](https://nodejs.org/en/blog/release/v20.0.0)'s release on April 18, 2023:
40
-
[Chrome 112](https://developer.chrome.com/blog/new-in-chrome-112), [Edge 112](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-relnote-archive-stable-channel#version-1120172248-april-14-2023), [Firefox 112](https://www.mozilla.org/en-US/firefox/112.0/releasenotes), and [Safari 16.4](https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes).
40
+
[Chrome 112](https://developer.chrome.com/blog/new-in-chrome-112), [Edge 112](https://learn.microsoft.com/en-us/deployedge/microsoft-edge-relnote-archive-stable-channel#version-1120172248-april-14-2023), [Firefox 112](https://www.mozilla.org/en-US/firefox/112.0/releasenotes/), and [Safari 16.4](https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes).
41
41
42
42
We know that Node 20 is now EOL,
43
43
but we didn't want to jump 2 LTS versions in one release.
44
44
Mocha 13 will drop support for Node 20.
45
45
46
-
See [#5358 🧹 Versioning: Bump minimum Node.js version from 18.18.0 to 20.19.0](https://github.com/mochajs/mocha/issues/5477) and [feat!: bump minimum Node.js version from 18.18.0 to 20.19.0 (#5477)](https://github.com/mochajs/mocha/pull/5477) for more details.
46
+
See [#5358 🧹 Versioning: Bump minimum Node.js version from 18.18.0 to 20.19.0](https://github.com/mochajs/mocha/issues/5358) and [feat!: bump minimum Node.js version from 18.18.0 to 20.19.0 (#5477)](https://github.com/mochajs/mocha/pull/5477) for more details.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reporters/doc.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The command `mocha --reporter doc array` would yield:
43
43
</section>
44
44
```
45
45
46
-
The SuperAgent request library [test documentation](https://ladjs.github.io/superagent/docs/test.html) was generated with Mocha's doc reporter using this Bash command:
46
+
The SuperAgent request library [test documentation](https://forwardemail.github.io/superagent/docs/test.html) was generated with Mocha's doc reporter using this Bash command:
--watch-ignore List of paths or globs to exclude from watching
27
+
--allow-uncaught Allow uncaught errors to propagate
28
+
--async-only, -A Require all tests to use a callback (async) or return a Promise
29
+
--bail, -b Abort ("bail") after first test failure
30
+
--check-leaks Check for global variable leaks
31
+
--color, -c, --colors Force-enable color output
32
+
--delay Delay initial execution of root suite
33
+
--diff Show diff on failure
34
+
--dry-run Report tests without executing them
35
+
--exit Force Mocha to quit after tests complete
36
+
--fail-hook-affected-tests Report tests as failed when affected by hook failures (before/beforeEach)
37
+
--pass-on-failing-test-suite Not fail test run if tests were failed
38
+
--fail-zero Fail test run if no test(s) encountered
39
+
--forbid-only Fail if exclusive test(s) encountered
40
+
--forbid-pending Fail if pending test(s) encountered
41
+
--full-trace Display full stack traces
42
+
--inline-diffs Display actual/expected differences inline within each string
43
+
--invert, -i Inverts --grep and --fgrep matches
44
+
--list-interfaces List built-in user interfaces & exit
45
+
--list-reporters List built-in reporters & exit
46
+
--no-colors, -C Force-disable color output
47
+
--parallel, -p Run tests in parallel
48
+
--posix-exit-codes Use POSIX and UNIX shell exit codes as Mocha's return value
49
+
--recursive Look for tests in subdirectories
50
+
--sort, -S Sort test files
51
+
--watch, -w Watch files in the current working directory for changes
52
+
--retries Retry failed tests this many times
53
+
--jobs, -j Number of concurrent jobs for --parallel; use 1 to run in serial
54
+
--config Path to config file
55
+
--fgrep, -f Only run tests containing this string
56
+
--grep, -g Only run tests matching this string or regexp
57
+
--package Path to package.json for config
58
+
--reporter, -R Specify reporter to use
59
+
--ui, -u Specify user interface
60
+
--slow, -s Specify "slow" test threshold (in milliseconds)
61
+
--timeout, -t, --timeouts Specify test timeout threshold (in milliseconds)
62
+
--help, -h Show usage information & exit
63
+
--version, -V Show version number & exit
104
64
105
65
Mocha Resources
106
66
Chat: https://discord.gg/KeDn2uXhER
@@ -175,7 +135,7 @@ It _can_ be time-consuming to debug--because it's not always obvious where the p
175
135
176
136
To ensure your tests aren't leaving messes around, here are some ideas to get started:
177
137
178
-
- See the [Node.js guide to debugging](https://nodejs.org/en/docs/inspector)
138
+
- See the [Node.js guide to debugging](https://nodejs.org/en/learn/getting-started/debugging)
179
139
- Use the new [`async_hooks`](https://github.com/nodejs/node/blob/master/doc/api/async_hooks.md) API ([example](https://gist.github.com/boneskull/7fe75b63d613fa940db7ec990a5f5843))
180
140
- Try something like [wtfnode](https://npm.im/wtfnode)
181
141
- Use [`.only`](/declaring/exclusive-tests) until you find the test that causes Mocha to hang
@@ -630,7 +590,7 @@ Implies `--timeout 0`.
630
590
:::note[Updated in v6.0.0]
631
591
:::
632
592
633
-
Each flag annotated of type `[boolean]` in Mocha's `--help` output can be _negated_ by prepending `--no-` to the flag name.
593
+
Each boolean flag can be _negated_ by prepending `--no-` to the flag name.
634
594
For example, `--no-color` will disable Mocha's color output, which is enabled by default.
635
595
636
596
Unless otherwise noted, _all_ boolean flags default to `false`.
@@ -649,10 +609,7 @@ You can also pass `node` flags to Node.js using [`--node-option`](#--node-option
649
609
650
610
### `--enable-source-maps`
651
611
652
-
:::note[New in Node.js v12.12.0]
653
-
:::
654
-
655
-
If the [`--enable-source-maps`](https://nodejs.org/dist/latest-v12.x/docs/api/cli.html#cli_enable_source_maps) flag
612
+
If the [`--enable-source-maps`](https://nodejs.org/api/cli.html#--enable-source-maps) flag
656
613
is passed to Mocha, source maps will be collected and used to provide accurate stack traces for transpiled code:
0 commit comments