require-hijack

v1.2.1
Hijack node require calls, with support for hijacking the entire module itself rather than only its properties. Handy for unit testing and mocking require calls in sub modules!
node require mock inject unit test

test

./node_modules/mocha/bin/mocha --reporter spec --recursive --ui bdd

test-coverage

./node_modules/istanbul/lib/cli.js cover -- ./node_modules/mocha/bin/_mocha --reporter spec --recursive --ui bdd
npm i require-hijack

Metadata

  • BSD
  • Whatever
  • Adam Terlson
  • released 10/10/2013

Downloads

Maintainers