Attempted to wrap undefined property as function

The poten­tial prob­lem could be that your meth­ods are dynamically-created meth­ods 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


You may also like...