I am trying to stub out a module and the return inside of it and having a little trouble. Here is what I have
var CrowdControlGet = sinon.stub();
var CrowdControl = sinon.stub().returns({
get: CrowdControlGet
});
this does not seem to work, but when I just have
var CrowdControl = testHelpers.stub()
it works fine, how do i get it to return a get inside which is also a stub? Thanks!