-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
update slow description #3466
update slow description #3466
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MEDIUM: Tests that run exceeding half of the threshold (but still within it) will show the duration in yellow. |
||
3. SLOW (in red): Tests that runs over the threshold. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SLOW: Tests that run exceeding the threshold will show the duration in red. |
||
|
||
To tweak what's considered "slow", you can use the `slow()` method: | ||
|
||
```js | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FAST: Tests that run within half of the "slow" threshold will show the duration in green (if at all).