UNPKG

require-hijack

Version:

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!

7 lines (5 loc) 122 B
console.log('here'); var Class = require('./sub/class'); console.log(Class); var c = new Class(); module.exports = null;