Skip to content

armgit / mocha

Public Imported from GitHub
0

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

refactor

TJ Holowaychukfa725dc68762
diff --git a/lib/runnable.js b/lib/runnable.js
index 4682e512..76a74f38 100644
--- a/lib/runnable.js
+++ b/lib/runnable.js
@@ -198,8 +198,9 @@ Runnable.prototype.run = function(fn){
return;
}
- if (this.asyncOnly)
+ if (this.asyncOnly) {
return done(new Error('--async-only option in use without declaring `done()`'));
+ }
// sync
try {
diff --git a/test/acceptance/misc/asyncOnly.js b/test/acceptance/misc/asyncOnly.js
index 94f7f6de..8b5b5f09 100644
--- a/test/acceptance/misc/asyncOnly.js
+++ b/test/acceptance/misc/asyncOnly.js
@@ -3,6 +3,7 @@ describe('asyncOnly', function(){
it('should display an error', function(){
})
+
it('should pass', function(done){
done();
})