From cd848afbdbac78b656847c75be1c0a9daf619045 Mon Sep 17 00:00:00 2001 From: simov Date: Thu, 2 Aug 2018 20:55:40 +0300 Subject: [PATCH] These are not going to fail if there is a server listening on those ports --- tests/test-headers.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/test-headers.js b/tests/test-headers.js index 59faae87e..68b748691 100644 --- a/tests/test-headers.js +++ b/tests/test-headers.js @@ -193,8 +193,7 @@ tape('preserve port in host header if non-standard port', function (t) { tape('strip port in host header if explicit standard port (:80) & protocol (HTTP)', function (t) { var r = request({ url: 'http://localhost:80/headers.json' - }, function (err, res, body) { - t.notEqual(err, null) + }, function (_err, res, body) { t.equal(r.req.socket._host, 'localhost') t.end() }) @@ -203,8 +202,7 @@ tape('strip port in host header if explicit standard port (:80) & protocol (HTTP tape('strip port in host header if explicit standard port (:443) & protocol (HTTPS)', function (t) { var r = request({ url: 'https://localhost:443/headers.json' - }, function (err, res, body) { - t.notEqual(err, null) + }, function (_err, res, body) { t.equal(r.req.socket._host, 'localhost') t.end() }) @@ -213,8 +211,7 @@ tape('strip port in host header if explicit standard port (:443) & protocol (HTT tape('strip port in host header if implicit standard port & protocol (HTTP)', function (t) { var r = request({ url: 'http://localhost/headers.json' - }, function (err, res, body) { - t.notEqual(err, null) + }, function (_err, res, body) { t.equal(r.req.socket._host, 'localhost') t.end() }) @@ -223,8 +220,7 @@ tape('strip port in host header if implicit standard port & protocol (HTTP)', fu tape('strip port in host header if implicit standard port & protocol (HTTPS)', function (t) { var r = request({ url: 'https://localhost/headers.json' - }, function (err, res, body) { - t.notEqual(err, null) + }, function (_err, res, body) { t.equal(r.req.socket._host, 'localhost') t.end() })