require-with
v0.1.1
Published
Dependency injection for Node.js
Downloads
10
Readme
Require-with
Dependency injection for node.js
Installation
npm install --save require-with
Usage
var requireWith = require('require-with');
var mockFancify = requireWith('./fancifier', { 'leftpad': function(a){return a} });
expect(mockFancify(something)).toBeFancy();
expect(mockFancify(something)).not.toBeLeftpadded();