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

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -