muk-require
Usage
Mock dependencies.
foo.js
const request = ; module { // Do something with request.};
test.js
const request = const mockedRequest = { // Log all requests. console; }; const foo = ;
You can also mock modules required with a relative path.
some/where/else/foo.js
const bar = ; module { // Do something with bar.};
some/where/else/bar.js
exportsattack = 'sludge attack!';
test.js
const muk = ;const foo = ;
Install
npm install muk-require
Tests
Tests are written with mocha
npm test