Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning for running docs by Eleventy #4066

Merged
merged 1 commit into from
Nov 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,21 @@ Mocha is a feature-rich JavaScript test framework running on [Node.js][] and in

Install with [npm][] globally:

```sh
```bash
$ npm install --global mocha
```

or as a development dependency for your project:

```sh
```bash
$ npm install --save-dev mocha
```

> As of v7.0.0, Mocha requires Node.js v8.0.0 or newer.

## Getting Started

```sh
```bash
$ npm install mocha
$ mkdir test
$ $EDITOR test/test.js # or open with your favorite editor
Expand All @@ -123,7 +123,7 @@ describe('Array', function() {

Back in the terminal:

```sh
```bash
$ ./node_modules/mocha/bin/mocha

Array
Expand All @@ -144,7 +144,7 @@ Set up a test script in package.json:

Then run tests with:

```sh
```bash
$ npm test
```

Expand Down Expand Up @@ -203,7 +203,7 @@ it('double done', function(done) {

Running the above test will give you the below error message:

```sh
```bash
$ ./node_modules/.bin/mocha mocha.test.js


Expand Down Expand Up @@ -728,7 +728,7 @@ describe('add()', function() {

The above code will produce a suite with three specs:

```sh
```bash
$ mocha

add()
Expand Down Expand Up @@ -1610,7 +1610,7 @@ Instructions for doing so can be found [here][mocha-wiki-growl].

Enable Mocha's desktop notifications as follows:

```sh
```bash
$ mocha --growl
```

Expand Down Expand Up @@ -1729,7 +1729,7 @@ As such, actual command-line arguments will take precedence over the defaults.

For example, suppose you have the following `mocha.opts` file:

```sh
```bash
# mocha.opts
--require should
--reporter dot
Expand All @@ -1741,7 +1741,7 @@ library, and use `bdd` as the interface. With this, you may then invoke `mocha`
with additional arguments, here changing the reporter to `list` and setting the
slow threshold to half a second:

```sh
```bash
$ mocha --reporter list --slow 500
```

Expand All @@ -1755,13 +1755,13 @@ your tests in `test/` folder. If you want to include subdirectories, pass the

To configure where `mocha` looks for tests, you may pass your own glob:

```sh
```bash
$ mocha --recursive "./spec/*.js"
```

Some shells support recursive matching by using the globstar (`**`) wildcard. Bash >= 4.3 supports this with the [`globstar` option][bash-globbing] which [must be enabled](https://github.com/mochajs/mocha/pull/3348#issuecomment-383937247) to get the same results as passing the `--recursive` option ([ZSH][zsh-globbing] and [Fish][fish-globbing] support this by default). With recursive matching enabled, the following is the same as passing `--recursive`:

```sh
```bash
$ mocha "./spec/**/*.js"
```

Expand Down Expand Up @@ -1846,7 +1846,7 @@ Real live example code:

To run Mocha's tests, you will need GNU Make or compatible; Cygwin should work.

```sh
```bash
$ cd /path/to/mocha
$ npm install
$ npm test
Expand Down