Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

docs

TJ Holowaychuk7e3f33144881
diff --git a/index.html b/index.html
index a90000f1..ef5e91bf 100644
--- a/index.html
+++ b/index.html
@@ -117,7 +117,7 @@ $ mocha
<h2 id="asynchronous-code">Asynchronous code</h2>
-<p>Testing asynchronous code with Mocha could not be simpler! Simply invoke the callback when your test is complete:</p>
+<p>Testing asynchronous code with Mocha could not be simpler! Simply invoke the callback when your test is complete. By adding a callback (usually named <code>done</code>) to <code>it()</code> Mocha will know that it should wait for completion.</p>
<pre><code>describe('User', function(){
describe('#save()', function(){
diff --git a/index.md b/index.md
index 5cf9a6b5..eef5d0a9 100644
--- a/index.md
+++ b/index.md
@@ -87,7 +87,7 @@ Mocha allows you to use any assertion library you want, if it throws an error, i
<h2 id="asynchronous-code">Asynchronous code</h2>
-Testing asynchronous code with Mocha could not be simpler! Simply invoke the callback when your test is complete:
+Testing asynchronous code with Mocha could not be simpler! Simply invoke the callback when your test is complete. By adding a callback (usually named `done`) to `it()` Mocha will know that it should wait for completion.
describe('User', function(){
describe('#save()', function(){