Downloads:

Why drink it?

JsMockito is a JavaScript stub/mock framework heavily inspired by Mockito. To quote the mockito website:

"Mockito is a mocking framework that tastes really good. It lets
you write beautiful tests with a clean & simple API. Mockito doesn't give you
a hangover because the tests are very readable and they produce clean
verification errors."

JsMockito aims to try and reproduce the clean & simple API, with a
JavaScript twist. And why not add some variation to your drinking habits?

What do you serve it with?

JsMockito must be served with
JsHamcrest. Not
only do they go well together, it's essential to avoid a very nasty
hangover.

How to drink it?

To use JsMockito with a JavaScript unit test framework, follow the usual
installation/configuration instructions for the framework and plug JsMockito
into it. If you're integrating with Screw.Unit
(and why wouldn't you?) then you just need to make the following calls: