mockit

Simple module dependency mocking

Mockit

Mockit is a simple library for mocking module dependencies during testing.

$ npm install mockit

To mock the http module in a required file:

var mockHttp = {
  // Mocked methods here... 
};
 
var Downloader = mockit('../lib/downloader', {
  http: mockHttp
});