Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit b7ce250

Browse files
finfinboneskull
authored andcommitted
update slow description (mochajs#3466)
Update mocha doc to have more details on the "slow" configuration
1 parent e4487e4 commit b7ce250

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/images/test-duration-range.png

5.62 KB
Loading

docs/index.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,18 @@ $ mocha
707707

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

710-
Many reporters will display test duration, as well as flagging tests that are slow, as shown here with the "spec" reporter:
710+
Many reporters will display test duration and flag tests that are slow (default: 75ms), as shown here with the "spec" reporter:
711711

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

714+
There are three levels of test duration (depicted in the following image):
715+
716+
1. FAST: Tests that run within half of the "slow" threshold will show the duration in green (if at all).
717+
2. NORMAL: Tests that run exceeding half of the threshold (but still within it) will show the duration in yellow.
718+
3. SLOW: Tests that run exceeding the threshold will show the duration in red.
719+
720+
![test duration range](images/test-duration-range.png?withoutEnlargement&resize=920,9999){:class="screenshot"}
721+
714722
To tweak what's considered "slow", you can use the `slow()` method:
715723

716724
```js

0 commit comments

Comments
 (0)