mercredi 9 août 2017

Cannot read property send of undefined json

I am doing unit testing with mocha and chai in Javascript. I created a JSON object so that I can define a function inside a function. But, I encountered an issue - cannot read property, send of undefined. What is wrong with the code?

    var a = {
       b: function(done){
       }
    };

    a.b.send = function(error){
    }

Aucun commentaire:

Enregistrer un commentaire