title: Injecting mocks into Browserify for testing
body: <p>I know, Browserify isn't really a DI framework, but is it possible to "inject", or somehow fake injecting, mock data into an application during unit testing?</p>
  
  <p>For example, to test the function:</p>
  
  <pre><code>var MyModel = require('./models/My.js');
  
  function doSomething() {
    // do something with model.
  }
  </code></pre>
  
  <p>with a mock My.js, like </p>
  
  <pre><code>describe('Do Something', function() {
  
    beforeEach(function() {
      // replace './models/My.js' with a Mock implementation.
    });
  
    it('with model', function() {
      // ... test
    });
  })
  </code></pre>
  
  <p>what goes in the <code>beforeEach</code> function?</p>