diff --git a/lib/request.js b/lib/request.js index e87c8e9..f6c7ec7 100644 --- a/lib/request.js +++ b/lib/request.js @@ -248,6 +248,9 @@ function Test (app, method, path) { util.inherits(Test, Request); function serverAddress (app, path) { + if (!app) { + throw new Error("You must pass a valid application or server into the request"); + } if ('string' === typeof app) { return app + path; }