title: Proxyquire, rewire, SandboxedModule, and Sinon: pros & cons
body: <p>When mocking Node dependencies, I've happened upon the following libraries:</p>
  
  <ul>
  <li><a href="https://github.com/thlorenz/proxyquire">Proxyquire</a></li>
  <li><a href="https://github.com/jhnns/rewire">Rewire</a></li>
  <li><a href="https://github.com/felixge/node-sandboxed-module">SandboxedModule</a></li>
  <li><a href="http://sinonjs.org/">Sinon</a></li>
  </ul>
  
  <p>They all seem to do more-or-less the same thing: allow you to mock <code>require()</code> calls (with the exception of Sinon which mocks pretty much everything).  They all seem to require some pretty elaborate setup, noting the exact syntax of the string passed to <code>require</code> -- not great during refactoring.</p>
  
  <p>What are the pros and cons of each library?  When would I choose one over the other?  What are example use-cases where each library excels?  What are other products in this space that are better?</p>