visionmedia/supertest — pull request #112 by ranzwertig (2014-03-17 09:00:16+00:00)
Title: close http.Server after test ended

running > 100 tests using supertest I had the problem that the socket hang up.

Error: socket hang up
at createHangUpError (http.js:1442:15)
at Socket.socketOnEnd [as onend] (http.js:1538:23)
at Socket.g (events.js:175:14)
at Socket.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:910:16
at process._tickCallback (node.js:415:13)

to prevent this without to increase the kern.maxfiles and kern.maxfilesperproc I have to close the opened http.Server after the test ended.