i'd hate that too :unamused:.

there are a couple ways to inject mocks from test code when `require()` is called.
*  Facebook just released a JS testing tool that does this: http://facebook.github.io/jest/docs/automatic-mocking.html
*  proxyquire: https://www.npmjs.org/package/proxyquire