Skip to content

armgit / mocha

Public Imported from GitHub
0

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

another test

Tj Holowaychukff5ddf2c316f
diff --git a/test/runnable.js b/test/runnable.js
index 55a2c66e..0bf59f35 100644
--- a/test/runnable.js
+++ b/test/runnable.js
@@ -93,6 +93,20 @@ describe('Runnable(title, fn)', function(){
});
})
})
+
+ describe('when an error is passed', function(){
+ it('should invoke the callback', function(done){
+ var calls = 0;
+ var test = new Runnable('foo', function(done){
+ done(new Error('fail'));
+ });
+
+ test.run(function(err){
+ err.message.should.equal('fail');
+ done();
+ });
+ })
+ })
})
})