Skip to content

Commit

Permalink
update slow description
Browse files Browse the repository at this point in the history
  • Loading branch information
finfin committed Aug 21, 2018
1 parent d401ee1 commit 500e638
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/index.md
Expand Up @@ -665,10 +665,16 @@ $ mocha

<h2 id="test-duration">Test duration</h2>

Many reporters will display test duration, as well as flagging tests that are slow, as shown here with the "spec" reporter:
Many reporters will display test duration, as well as flagging tests that are slow, as shown here with the "spec" reporter: (Default is 75ms)

![test duration](images/reporter-spec-duration.png?withoutEnlargement&resize=920,9999){:class="screenshot"}

There are three levels of test duration:

1. FAST: Tests run under half of the "slow" threshold is considered "FAST". The duration will be shown in green or not shown at all.
2. REASONABLE (in yellow): Tests duration under threshold but above half of threshold will be shown in yellow.
3. SLOW (in red): Tests that runs over the threshold.

To tweak what's considered "slow", you can use the `slow()` method:

```js
Expand Down

0 comments on commit 500e638

Please sign in to comment.