☕️ Classic, reliable, trusted test framework for Node.js and the browser
Be explicit about styling of screenshot images
Peter Müllerd5a512563d0e
diff --git a/docs/css/style.css b/docs/css/style.cssindex 5216b4f8..164a77c5 100644--- a/docs/css/style.css+++ b/docs/css/style.css@@ -164,7 +164,7 @@ pre {overflow-x: auto;}-main img:not([src*=avatar]):not([src*=badges]):not([src*=".svg"]) {+img.screenshot {display: block;margin: 30px auto;border-radius: 3px;diff --git a/docs/index.md b/docs/index.mdindex cd8d27c9..69186c4d 100644--- a/docs/index.md+++ b/docs/index.md@@ -635,7 +635,7 @@ $ mochaMany reporters will display test duration, as well as flagging tests that are slow, as shown here with the "spec" reporter:-+{:class="screenshot"}To tweak what's considered "slow", you can use the `slow()` method:@@ -702,7 +702,7 @@ Again, use `this.timeout(0)` to disable the timeout for a hook.Mocha supports the `err.expected` and `err.actual` properties of any thrown `AssertionError`s from an assertion library. Mocha will attempt to display the difference between what was expected, and what the assertion actually saw. Here's an example of a "string" diff:-+{:class="screenshot"}## Usage@@ -1013,69 +1013,69 @@ Mocha reporters adjust to the terminal window, and always disable ANSI-escape coThis is the default reporter. The "spec" reporter outputs a hierarchical view nested just as the test cases are.--+{:class="screenshot"}+{:class="screenshot"}### Dot MatrixThe dot matrix (or "dot") reporter is simply a series of characters which represent test cases. Failures highlight in red exclamation marks (`!`), pending tests with a blue comma (`,`), and slow tests as yellow. Good if you prefer minimal output.-+{:class="screenshot"}### NyanThe "nyan" reporter is exactly what you might expect:-+{:class="screenshot"}### TAP-The TAP reporter emits lines for a [Test-Anything-Protocol](http://en.wikipedia.org/wiki/Test_Anything_Protocol) consumer.+The TAP reporter emits lines for a [Test-Anything-Protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) consumer.-+{:class="screenshot"}### Landing StripThe Landing Strip (`landing`) reporter is a gimmicky test reporter simulating a plane landing :) unicode ftw--+{:class="screenshot"}+{:class="screenshot"}### ListThe "list" reporter outputs a simple specifications list as test cases pass or fail, outputting the failure details at the bottom of the output.-+{:class="screenshot"}### ProgressThe "progress" reporter implements a simple progress-bar:-+{:class="screenshot"}### JSONThe "JSON" reporter outputs a single large JSON object when the tests have completed (failures or not).-+{:class="screenshot"}### JSON StreamThe "JSON stream" reporter outputs newline-delimited JSON "events" as they occur, beginning with a "start" event, followed by test passes or failures, and then the final "end" event.-+{:class="screenshot"}### MinThe "min" reporter displays the summary only, while still outputting errors on failure. This reporter works great with `--watch` as it clears the terminal in order to keep your test summary at the top.-+{:class="screenshot"}### DocThe "doc" reporter outputs a hierarchical HTML body representation of your tests. Wrap it with a header, footer, and some styling, then you have some fantastic documentation!-+{:class="screenshot"}For example, suppose you have the following JavaScript:@@ -1127,7 +1127,7 @@ The "markdown" reporter generates a markdown TOC and body for your test suite. TThe "HTML" reporter is currently the only browser reporter supported by Mocha, and it looks like this:-+{:class="screenshot"}### Undocumented Reporters@@ -1242,22 +1242,22 @@ $ make tm### JetBrains-[JetBrains](http://jetbrains.com) provides a [NodeJS plugin](http://www.jetbrains.com/idea/features/nodejs.html) for its suite of IDEs (IntelliJ IDEA, WebStorm, etc.), which contains a Mocha test runner, among other things.+[JetBrains](https://www.jetbrains.com/) provides a [NodeJS plugin](https://www.jetbrains.com/idea/features/nodejs.html) for its suite of IDEs (IntelliJ IDEA, WebStorm, etc.), which contains a Mocha test runner, among other things.-+{:class="screenshot"}The plugin is titled **NodeJS**, and can be installed via **Preferences** > **Plugins**, assuming your license allows it.### Wallaby.js-[Wallaby.js](http://wallabyjs.com) is a continuous testing tool that enables real-time code coverage for Mocha with any assertion library in JetBrains IDEs (IntelliJ IDEA, WebStorm, etc.) and Visual Studio for both browser and node.js projects.+[Wallaby.js](https://wallabyjs.com/) is a continuous testing tool that enables real-time code coverage for Mocha with any assertion library in JetBrains IDEs (IntelliJ IDEA, WebStorm, etc.) and Visual Studio for both browser and node.js projects.-+{:class="screenshot"}### Emacs[Emacs](https://www.gnu.org/software/emacs/) support for running Mocha tests is available via a 3rd party package [mocha.el](https://github.com/scottaj/mocha.el). The package is available on MELPA, and can be installed via `M-x package-install mocha`.-+{:class="screenshot"}### Mocha Sidebar (VS Code)@@ -1270,7 +1270,7 @@ The plugin is titled **NodeJS**, and can be installed via **Preferences** > **Pl* auto run tests on file save* see tests results directly in the code editor-+{:class="screenshot"}## Examples