Skip to content

armgit / mocha

Public Imported from GitHub
0

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

update

Tj Holowaychuke5b88f7da43d
diff --git a/index.html b/index.html
index 3f97985c..1a9940ef 100644
--- a/index.html
+++ b/index.html
@@ -27,6 +27,7 @@
<li>auto-detects and disables coloring for non-ttys</li>
<li>maps uncaught exceptions to the correct test case</li>
<li>async test timeout support</li>
+<li>test-specific timeouts</li>
<li>growl notification support</li>
<li>reports test durations</li>
<li>highlights slow tests</li>
@@ -435,6 +436,16 @@ describe('app', function(){
<pre><code>$ mocha --reporter list --growl
</code></pre>
+<h2>Test specific timeouts</h2>
+
+<p> To compliment the global <code>--timeout</code> option, you may also specific test-specific timeouts via <code>this.timeout()</code>, or disable the timeout all-together with <code>this.timeout(0)</code>.</p>
+
+<pre><code>it('should take less than 500ms', function(done){
+ this.timeout(500);
+ setTimeout(done, 300);
+})
+</code></pre>
+
<h2>Best practices</h2>
<h3>test/*</h3>