Attempted to wrap undefined property as function
The potential problem could be that your methods are dynamically-created methods through Object.prototype
.
If that’s the case then, you can try the following :
sinon.stub(FUT.prototype, "Foo").returns(true);
FUT - Function Under Test
Recent Comments