0.1.1 • Published 10 years ago

require-with v0.1.1

Weekly downloads
4
License
GPL-3.0
Repository
github
Last release
10 years ago

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();