mocking a constructor doesn't give access to methods without using call or apply.
jsdevel opened this issue · comments
Joe Spencer commented
Observe:
function Test(){
this.test=function(){
};
}
var test = mock(Test);
console.log(when(test).test);
This returns the following in my console:
{call:[Function], apply:[Function]}
Any idea why?
This library is very amazing BTW. Thanks a bunch for it!
Joe Spencer commented
The fix for issue #23 resolved this issue for me.