node.js - Writing mocha test for nodejs -
i beginner nodejs, need know how write mocha test nodejs variable definitions.
for example,
if had object this,
var objectname = { filename : '', filepath : '' }
then how can write mocha test variable definition. please me write test code. in advance!
i don't test kind of stuff usually, can make (using chai.expect) :
var obj = { name:'' }; describe('my object definition', function(){ it('should give me empty name', function(){ expect(obj.name).to.equals(''); }); });
Comments
Post a Comment