Skip to content

Commit

Permalink
lint docs/**/*.md [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Dec 21, 2017
1 parent d3497e4 commit b1260f2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
3 changes: 2 additions & 1 deletion docs/_includes/backers.md
@@ -1,6 +1,7 @@
## Backers

Find Mocha helpful? Become a [backer](https://opencollective.com/mochajs#support) and support Mocha with a monthly donation.
Find Mocha helpful? Become a [backer](https://opencollective.com/mochajs#support) and support Mocha with a monthly donation.

<!-- markdownlint-disable MD034 -->
{: id="_backers" }
{% for i in (0..29) %}[![](//opencollective.com/mochajs/backer/{{ i }}/avatar){: onload="window.avatars.backerLoaded()" }](https://opencollective.com/mochajs/backer/{{ i }}/website){: target="_blank"} {% endfor %}
1 change: 1 addition & 0 deletions docs/_includes/sponsors.md
Expand Up @@ -2,5 +2,6 @@

Use Mocha at Work? Ask your manager or marketing team if they'd help [support](https://opencollective.com/mochajs#support) our project. Your company's logo will also be displayed on [npmjs.com](http://npmjs.com/package/mocha) and our [GitHub repository](https://github.com/mochajs/mocha#sponsors).

<!-- markdownlint-disable MD034 -->
{: id="_sponsors" }
{% for i in (0..29) %}[![](//opencollective.com/mochajs/sponsor/{{ i }}/avatar){: onload="window.avatars.sponsorLoaded()" }](https://opencollective.com/mochajs/sponsor/{{ i }}/website){: target="_blank"} {% endfor %}
41 changes: 20 additions & 21 deletions docs/index.md
Expand Up @@ -23,17 +23,17 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js](http://no
- [maps uncaught exceptions to the correct test case](#browser-specific-methods)
- [async test timeout support](#delayed-root-suite)
- [test retry support](#retry-tests)
- [test-specific timeouts](#test-level)
- [test-specific timeouts](#test-level)
- [growl notification support](#mochaopts)
- [reports test durations](#test-duration)
- [highlights slow tests](#dot-matrix)
- [file watcher support](#min)
- [global variable leak detection](#--check-leaks)
- [optionally run tests that match a regexp](#-g---grep-pattern)
- [file watcher support](#min)
- [global variable leak detection](#--check-leaks)
- [optionally run tests that match a regexp](#-g---grep-pattern)
- [auto-exit to prevent "hanging" with an active loop](#--exit----no-exit)
- [easily meta-generate suites](#markdown) & [test-cases](#list)
- [mocha.opts file support](#mochaopts)
- clickable suite titles to filter test execution
- clickable suite titles to filter test execution
- [node debugger support](#-d---debug)
- detects multiple calls to `done()`
- [use any assertion library you want](#assertions)
Expand Down Expand Up @@ -295,7 +295,7 @@ describe('hooks', function() {
});
```

> Tests can appear before, after, or interspersed with your hooks. Hooks will run in the order they are defined, as appropriate; all `before()` hooks run (once), then any `beforeEach()` hooks, tests, any `afterEach()` hooks, and finally `after()` hooks (once).
> Tests can appear before, after, or interspersed with your hooks. Hooks will run in the order they are defined, as appropriate; all `before()` hooks run (once), then any `beforeEach()` hooks, tests, any `afterEach()` hooks, and finally `after()` hooks (once).
### Describing Hooks

Expand Down Expand Up @@ -527,9 +527,9 @@ it('should only test in the correct environment', function() {
});
```

The above test will be reported as [pending](#pending-tests). It's also important to note that calling `this.skip()` will effectively *abort* the test.
The above test will be reported as [pending](#pending-tests). It's also important to note that calling `this.skip()` will effectively *abort* the test.

> *Best practice*: To avoid confusion, do not execute further instructions in a test or hook after calling `this.skip()`.
> *Best practice*: To avoid confusion, do not execute further instructions in a test or hook after calling `this.skip()`.
Contrast the above test with the following code:

Expand Down Expand Up @@ -647,7 +647,6 @@ describe('something slow', function() {
});
```


## Timeouts

### Suite-level
Expand Down Expand Up @@ -704,7 +703,7 @@ Mocha supports the `err.expected` and `err.actual` properties of any thrown `Ass

## Usage

```
```text
Usage: mocha [debug] [options] [files]
Expand Down Expand Up @@ -778,7 +777,7 @@ Executes tests on changes to JavaScript in the CWD, and once initially.

### `--exit` / `--no-exit`

*Updated in Mocha v4.0.0*
> *Updated in Mocha v4.0.0*
*Prior to* version v4.0.0, *by default*, Mocha would force its own process to exit once it was finished executing all tests. This behavior enables a set of potential problems; it's indicative of tests (or fixtures, harnesses, code under test, etc.) which don't clean up after themselves properly. Ultimately, "dirty" tests can (but not always) lead to *false positive* or *false negative* results.

Expand All @@ -797,7 +796,7 @@ To ensure your tests aren't leaving messes around, here are some ideas to get st

### `--compilers`

*Updated in Mocha v4.0.0*
> *Updated in Mocha v4.0.0*
**`--compilers` is deprecated as of Mocha v4.0.0. See [further explanation and workarounds](https://github.com/mochajs/mocha/wiki/compilers-deprecation).**

Expand Down Expand Up @@ -1110,9 +1109,9 @@ The SuperAgent request library [test documentation](http://visionmedia.github.io

```makefile
test-docs:
$(MAKE) test REPORTER=doc \
| cat docs/head.html - docs/tail.html \
> docs/test.html
$(MAKE) test REPORTER=doc \
| cat docs/head.html - docs/tail.html \
> docs/test.html
```

View the entire [Makefile](https://github.com/visionmedia/superagent/blob/master/Makefile) for reference.
Expand Down Expand Up @@ -1210,7 +1209,7 @@ The following option(s) *only* function in a browser context:

Back on the server, Mocha will attempt to load `./test/mocha.opts` as a configuration file of sorts. The lines in this file are combined with any command-line arguments. The command-line arguments take precedence. For example, suppose you have the following `mocha.opts` file:

```
```sh
--require should
--reporter dot
--ui bdd
Expand Down Expand Up @@ -1253,6 +1252,7 @@ The plugin is titled **NodeJS**, and can be installed via **Preferences** > **Pl
![Wallaby.js in Action](images/wallaby.png)

### 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`.

![Emacs Mocha Runner in Action](images/emacs.png)
Expand All @@ -1263,10 +1263,10 @@ The plugin is titled **NodeJS**, and can be installed via **Preferences** > **Pl

#### Features

* see all tests in VS Code sidebar menu
* run & debug tests for each level hierarchy from all tests to a single test (and each describe of course)
* auto run tests on file save
* see tests results directly in the code editor
- see all tests in VS Code sidebar menu
- run & debug tests for each level hierarchy from all tests to a single test (and each describe of course)
- auto run tests on file save
- see tests results directly in the code editor

![mocha side bar in Action](images/mocha_side_bar.png)

Expand Down Expand Up @@ -1299,4 +1299,3 @@ $ REPORTER=nyan npm test
## More Information

In addition to chatting with us on [Gitter](https://gitter.im/mochajs/mocha), for additional information such as using spies, mocking, and shared behaviours be sure to check out the [Mocha Wiki](https://github.com/mochajs/mocha/wiki) on GitHub. For discussions join the [Google Group](http://groups.google.com/group/mochajs). For a running example of Mocha, view [example/tests.html](example/tests.html). For the JavaScript API, view the [source](https://github.com/mochajs/mocha/blob/master/lib/mocha.js#L51).

0 comments on commit b1260f2

Please sign in to comment.