thlorenz/proxyquire — pull request #43 by davidbau (2014-09-17 21:07:52+00:00)
Title: Support removing packages by stubbing to null.

This change is motivated by tests that need to check behavior when require('crypto') fails.

With this change, proxyquire can remove packages by supplying null as the stub.

proxyquire('tested', { crypto: null })

The above will throw an error (same as Node's module-not-found exception) when tested.js tries to require('crypto').