title: testing remote IP address behaviors on a Node Express server
body: <p>I'm writing unit tests for a Node.js Express server. The server does some stuff that depends on the remote client's IP address, retrieved using <a href="http://expressjs.com/api.html#req.ip" rel="nofollow"><code>req.ip</code></a> on the server.</p>
  
  <p>How can I write unit tests that will spoof their own IP addresses to test the server's responses, or is there a better way to achieve the same end? (I'm writing the unit tests in jasmine-node, if it matters.)</p>