From 86750c7e594c419dfae957aaf7e44e61e1d480e8 Mon Sep 17 00:00:00 2001 From: cronopio Date: Thu, 10 Oct 2013 11:04:17 -0500 Subject: [PATCH] [tests] throw error when no options, ALL TESTS PASSING! YAY --- lib/http-proxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/http-proxy.js b/lib/http-proxy.js index bcaa36e9e..24efb4687 100644 --- a/lib/http-proxy.js +++ b/lib/http-proxy.js @@ -20,7 +20,7 @@ var http = require('http'), */ proxy.createProxyServer = proxy.createServer = function createProxyServer(options) { - /* if(!options) { + if(!options) { throw new Error([ "`options` is needed and it must have the following layout:", " ", @@ -37,7 +37,7 @@ proxy.createProxyServer = proxy.createServer = function createProxyServer(option " `options.target and `options.forward` cannot be ", " both missing " ].join("\n")); - } */ + } return new httpProxy.Server(options); };