title: Error: "Parse Error at Socket.socketOnData (http.js:1583:20)" while using mocha framework in node.js
body: <p>I am using mocha framework for writing test cases in node.js, all the test cases work fine except update test case for a particular method.
  Here is my code:</p>
  
  <pre><code>it("should update market if exists", function(done) {
    var market = {
      name: 'market name updated',
      description: 'description is updated'
    }
    request('http://localhost:3000')
      .put('/admin/product/chairs')
      .send(market)
      .expect(200, done);
  });
  it("should not update market", function(done) {
    var market = {
      name: 'market name updated',
      description: 'description is updated'
    }
    request('http://localhost:3000')
      .put('/admin/product/chai')
      .send(market)
      .expect(404, done);
  });
  </code></pre>
  
  <p>In second case I am giving wrong URL to get 404 response but got this.
  Error: Parse Error
      at Socket.socketOnData (http.js:1583:20)
      at TCP.onread (net.js:527:27)</p>