I assume have a JavaScript prototype with a constructor definition. Something like this:
function MyThing() {}
MyThing.prototype.doesStuff = function () { /* ... */ };
In that case, the closest thing to Easymock is:
var myStubbedThing = sinon.createStubInstance(MyThing);
This will not invoke the constructor, but create an object of the same type and stub out all functions on it.
-Max
> --
> You received this message because you are subscribed to the Google Groups "Sinon.JS" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sinonjs+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>