如何在jasmine中的函数内模拟函数调用

时间:2016-01-07 10:33:54

标签: jasmine

我想在调用getState

时模拟privateObj.checkstatus(request)
    var privateObj = require('somepackage')
 module.exports = {  

    getState: function(req, res, next, logService) {        
        var request = {
            url: 'www.google.com'
}
        var status = privateObj.checkstatus(request);
      if(status=='123')   {   console.log(status);   }   logService.info(logMsg);
    enter code here
        res.send(status);

    }}

0 个答案:

没有答案