From 069fa1625f19f5daab2bd3c4e0d01ba63a6299da Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Sun, 12 Mar 2017 15:03:17 +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`. --- 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 aff0eb76f8878a..cf379e591d6088 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]);