Re:Adonis.js v2 released – Laravel for Node.js
by madeofpalk on Saturday January 02, 2016 @11:43PM
(#10829537)
Proxyquire - https://github.com/thlorenz/proxyquire - is a nicer way to solve many of the problems that people tend to use rewire for.
We use it to stub out imports in our unit tests and find it very easy.
[0] https://www.npmjs.com/package/rewire