From 92bcc13be00ef73c4989f1c8ad92c0f4a4c0b911 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Tue, 14 Mar 2017 20:43:39 +0100 Subject: [PATCH] test: test resolveObject with an empty path Add a case to test an URL object that has no path at all for `url.resolveObject`. PR-URL: https://github.com/nodejs/node/pull/11811 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Yuta Hiroto Reviewed-By: Joyee Cheung --- test/parallel/test-url-relative.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js index aff0eb76f88..cf379e591d6 100644 --- a/test/parallel/test-url-relative.js +++ b/test/parallel/test-url-relative.js @@ -368,6 +368,9 @@ const relativeTests2 = [ ['https://example.com/foo', 'https://user:password@example.com', 'https://user:password@example.com/foo'], + + // No path at all + ['#hash1', '#hash2', '#hash1'] ]; relativeTests2.forEach(function(relativeTest) { const a = url.resolve(relativeTest[1], relativeTest[0]);