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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -