atifsyedali/grunt-mocha-require-phantom — pull request #1 by Wattos (2014-11-13 09:37:32+00:00)
Title: Fix grunt test server from timing out on certain requests and throwing errros on invalid URL access

Steps:

1) Run the task with the keepalive option
2) Enter any localhost:4000/randomUrlHere in the browser
3) Notice, the requests times out.

This is because we never end the request if we miss both if statements in the request handler.

In addition, if the requests happens to be prefixed with basePathForTests, then we will get an error server side. Instead we should return a 404.