Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Feb 16, 2019
1 parent 8b0edaa commit 830cb02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/index.md
Expand Up @@ -626,7 +626,7 @@ Because this test _does nothing_, it will be reported as _passing_.

> _Best practice_: Don't do nothing! A test should make an assertion or use `this.skip()`.
To skip _multiple_ tests in this manner, use `this.skip()` in a "before" hook:
To skip _multiple_ tests in this manner, use `this.skip()` in a "before all" hook:

```js
before(function() {
Expand Down Expand Up @@ -662,6 +662,8 @@ describe('outer', function() {
});
```

Skipping a test within an "after each" or "after all" hook is deprecated and will throw an exception in a future version of Mocha. Use a return statement or other means to abort hook execution.

> Before Mocha v3.0.0, `this.skip()` was not supported in asynchronous tests and hooks.
## Retry Tests
Expand Down Expand Up @@ -910,7 +912,7 @@ Enforce a rule that tests must be written in "async" style, meaning each test pr

### `--bail, -b`

Causes Mocha to stop running tests after the first test failure it encounters. Corresponding `after()` and `afterEach()` hooks are executed for potential cleanup.
Causes Mocha to stop running tests after the first test failure it encounters. Corresponding "after each" and "after all" hooks are executed for potential cleanup.

`--bail` does _not_ imply `--exit`.

Expand Down

0 comments on commit 830cb02

Please sign in to comment.