From 500e638b92f91b1a63b9fb7760db89869b0508ab Mon Sep 17 00:00:00 2001 From: fin Date: Tue, 21 Aug 2018 09:33:43 +0800 Subject: [PATCH 1/3] update slow description --- docs/index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 4ba7c501b0..fbe19224cb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -665,10 +665,16 @@ $ mocha

Test duration

-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 From 5806a280b2260edc1fdcdd556921731d74e210a0 Mon Sep 17 00:00:00 2001 From: fin Date: Sat, 25 Aug 2018 22:00:17 +0800 Subject: [PATCH 2/3] wordsmithing --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index fbe19224cb..e322d9e589 100644 --- a/docs/index.md +++ b/docs/index.md @@ -665,7 +665,7 @@ $ mocha

Test duration

-Many reporters will display test duration, as well as flagging tests that are slow, as shown here with the "spec" reporter: (Default is 75ms) +Many reporters will display test duration and flag tests that are slow (default: 75ms), as shown here with the "spec" reporter: ![test duration](images/reporter-spec-duration.png?withoutEnlargement&resize=920,9999){:class="screenshot"} From efb2061076ebc4d34f1720edf8cd3dcd4e6c2d7b Mon Sep 17 00:00:00 2001 From: fin Date: Wed, 7 Nov 2018 22:31:52 +0800 Subject: [PATCH 3/3] add threshold explanation image --- docs/images/test-duration-range.png | Bin 0 -> 5755 bytes docs/index.md | 10 ++++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 docs/images/test-duration-range.png diff --git a/docs/images/test-duration-range.png b/docs/images/test-duration-range.png new file mode 100644 index 0000000000000000000000000000000000000000..26dcfc0460654dcdb3552cfb7c57f72a0eaab53d GIT binary patch literal 5755 zcmd^@cQhOB+y7CD8Zla}k(#lJmfF;4X&NK;NbOZ6)ZQXS(NIB%J^E2IwL+<)s`l0* zQM=Sit(vL*^mBga`+NR={(R1J&gt>C;26rJrjU#Po zDM@Cg905F(sYa~VjaZHR9~Uwt%rK77mA8HiDOYTIz)AVRC&bIp)Y_Zp>f;Fm4IWA? zD21A>@8Lr#=LMBd&LbZQbN-I9&ipTzk!?E*0UN|BE3?nl)ye_eRWn-mSSTp}F94v- z7a^d!Dl=npRq$Nqq!?-r^y{4%aO|UBjFcNC`uQ-XjYtZ*NR1Zio{44uelNG6E9xd1 zm-h#2>8Ld*{zD{vyF-T?1r^_a*kXz7oM7gYxcc8ID(cPoGiy-`kELYoi}he0Uj3Ac z5d=4u!@$a88;qVh8DF44%1`_$XH=sCG16xfThxt=RAro$3thq26p@VC#Vtjw7 zba>vUA6!M6S$VEZrhnd%!pfg$8HNuyn)M)F$P#zncI44Gd-ff9Jdh_DT}#TDS~~Ml z{8e6oj~vi7H+CU$naSUCrUDf|c-LrVb3p?fxTq>ams65Wv}Qeuo{0d(taV(vy^Ov8 zm?r4Lx=!K7D?CR}#Z~VWy5CUbk_*-4u({>-3v-eK4p*r|qa#E9 z*mE^4jb6WZqBpv_xq@|OWccUxeyO38IWy^ONH+X5R0eOdA`kWi0-G+RaC5DMe1fC< zYjkmOW~SlSnx2pd_+eO`=nh)l(5WXv=4I^I?<#nI{2&U8Y|7Ysk^gQ?dViMRe9V(n~7v6EuH_(s0daE@hT;)z_O!Ns4YoqK()17uxwn@D5ID|6=1Pl zme9ol8vk_o+7 zu_C9SQr;i>q~tJ;LWgr#jVA8(N&v2+)c5{WCCK@Rx8ryxwMMDCUa+y$@nWRXeSSJc zmnk6oET6O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