In The Wild: Mockito for Javascript

Yes it’s true… there in is a framework that acts just like mockito for javascript: jsMockito!
The stubbing action looks pretty cool, and I’ll try in depth later when I’m home. But here’s a quick sample to whet your appetite:
var mockedObject = mock(Array);
when(mockedObject).get(1).thenReturn("hello world");
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!














February 19th, 2010 at 1:01 am
So… what did you think after your in-depth trial?