You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+15-8
Original file line number
Diff line number
Diff line change
@@ -674,7 +674,7 @@ Before Mocha v3.0.0, `this.skip()` was not supported in asynchronous tests and h
674
674
675
675
You can choose to retry failed tests up to a certain number of times. This feature is designed to handle end-to-end tests (functional tests/Selenium...) where resources cannot be easily mocked/stubbed. **It's not recommended to use this feature for unit tests**.
676
676
677
-
This feature does re-run `beforeEach/afterEach` hooks but not `before/after` hooks.
677
+
This feature does re-run a failed test and its corresponding `beforeEach/afterEach` hooks, but not `before/after` hooks. `this.retries()` has no effect on failing hooks.
678
678
679
679
**NOTE**: Example below was written using Selenium webdriver (which [overwrites global Mocha hooks][selenium-webdriver-testing] for `Promise` chain).
680
680
@@ -739,7 +739,7 @@ $ mocha
739
739
740
740
<h2id="test-duration">Test duration</h2>
741
741
742
-
Many reporters will display test duration and flag tests that are slow (default: 75ms), as shown here with the "spec" reporter:
742
+
Many reporters will display test duration and flag tests that are slow (default: 75ms), as shown here with the SPEC reporter:
@@ -813,7 +813,7 @@ Again, use `this.timeout(0)` to disable the timeout for a hook.
813
813
814
814
## Diffs
815
815
816
-
Mocha supports the `err.expected` and `err.actual` properties of any thrown `AssertionError`s from an assertion library. Mocha will attempt to display the difference between what was expected, and what the assertion actually saw. Here's an example of a "string" diff:
816
+
Mocha supports the `err.expected` and `err.actual` properties of any thrown `AssertionError`s from an assertion library. Mocha will attempt to display the difference between what was expected, and what the assertion actually saw. Here's an example of a "string" diff using `--inline-diffs`:
0 commit comments