title: Promise returned as undefined
body: <p>I am trying to return a promise but getting undefined.Please find below the code</p>
  
  <pre><code>fnCompare: function ( paramA, paramB){
  
      var compObj = new CompFn({
         //Initiate some Values here
      });
  
  
      return compObj.doCheck().then(function(data){       
          return data;
  
      });     
  }
  </code></pre>
  
  <p>Calling Function -</p>
  
  <pre><code>asyncFunc.fnCompare(paramOne,paramTwo).then( function(data){
  
      console.log("Found differences: " + data.desc);
      assert.equal(data.code,expectedValue);
  
  }, function(err) {
        throw err;
  });
  </code></pre>
  
  <p>Getting the error - Cannot call then of undefined. Any help would be useful. I tried to implement this using a solution provided here, but perhaps doing something wrong.</p>