node.js - Why Isn't a Mocha Test Failing When Returning false -
shouldn't mocha test fail if straight return false;? mine still passing. why?
describe('some description', function(){ it('should something', function (){ return false; }); });
from mocha documentation:
mocha allows use assertion library want, if throws error, work! means can utilize libraries such should.js, node's regular assert module, or others.
so if want test fail throw error
describe('some description', function() { it('should something', function() { throw new error(); }); });
Comments
Post a Comment