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");
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • BlogMemes
  • Blogosphere News
  • description
  • Fark
  • LinkedIn
  • NewsVine
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!