Skip to content

Commit

Permalink
Change sh to bash for code block
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunSangHan authored and boneskull committed Nov 22, 2019
1 parent 2de0618 commit 2e9c28a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/index.md
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 @@ -1621,7 +1621,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 @@ -1740,7 +1740,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 @@ -1752,7 +1752,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 @@ -1766,13 +1766,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 @@ -1857,7 +1857,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

0 comments on commit 2e9c28a

Please sign in to comment.