☕️ Classic, reliable, trusted test framework for Node.js and the browser
docs: Add warning about async callback for describe (#5046)
Marc Durdinc43930cc6dc4
diff --git a/docs/index.md b/docs/index.mdindex bf9c12fd..cc3d9eb2 100644--- a/docs/index.md+++ b/docs/index.md@@ -298,6 +298,11 @@ describe('#find()', function () {});```+### Limitations of asynchronous callbacks++You can use all asynchronous callbacks (`done`, `Promise`, and `async`/`await`) in callbacks for `it()`, `before()`, `after()`, `beforeEach()`, `afterEach()`) but not `describe()` -- it must be synchronous.+See [#5046](https://github.com/mochajs/mocha/pull/5046) for more information.+## Synchronous CodeWhen testing synchronous code, omit the callback and Mocha will automatically continue on to the next test.