I'm using should.js && mocha as test framework to build an application.
I'm returning 'true' for an API method and I found out that should.js was accepting everything as true, which is not.
I set up the following test:
describe('Login', function(){
it('Should login and return true', function(done){
isTrue().should.be.true;
done();
});
});
function isTrue()
{
return 'false';
}
And Powershell + mocha result was :
PS C:\Dev\project> mocha --grep logi*
Login
√ Should login and return true
1 passing (27ms)
Am I missing something?