Skip to content

armgit / mocha

Public Imported from GitHub
0

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

test for this.timeout()

Tj Holowaychuk7597bc8f615b
diff --git a/test/mocha.opts b/test/mocha.opts
index 47b43e92..a811d037 100644
--- a/test/mocha.opts
+++ b/test/mocha.opts
@@ -3,3 +3,4 @@
--ui bdd
--growl
--globals okGlobalA,okGlobalB
+--timeout 200
diff --git a/test/timeout.js b/test/timeout.js
index 70b506f0..c37d2b1b 100644
--- a/test/timeout.js
+++ b/test/timeout.js
@@ -11,4 +11,10 @@ describe('timeouts', function(){
// setTimeout(done, 3000);
done();
})
-});
\ No newline at end of file
+
+ it('should allow overriding per-test', function(done){
+ this.timeout(1000);
+ setTimeout(done, 300);
+ })
+})
+