☕️ Classic, reliable, trusted test framework for Node.js and the browser
tweak timeout/hook docs
Christopher Hiller390396dbaf22
diff --git a/index.md b/index.mdindex 99acb004..713cfd58 100644--- a/index.md+++ b/index.md@@ -615,17 +615,19 @@ it('should take less than 500ms', function(done){### Hook-level-Hook-level timeouts may also be applied, or the use of `this.timeout(0)` to disable timeout for a hook:+Hook-level timeouts may also be applied:```jsdescribe('a suite of tests', function() {beforeEach(function(done) {- this.timeout(3000); // A very long evironment setup.+ this.timeout(3000); // A very long environment setup.setTimeout(done, 2500);});});```+Again, use `this.timeout(0)` to disable the timeout for a hook.+## DiffsMocha 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: