Skip to content

Commit 92bcc13

Browse files
committed
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: #11811 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 879d666 commit 92bcc13

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/parallel/test-url-relative.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ const relativeTests2 = [
368368
['https://example.com/foo',
369369
'https://user:[email protected]',
370370
'https://user:[email protected]/foo'],
371+
372+
// No path at all
373+
['#hash1', '#hash2', '#hash1']
371374
];
372375
relativeTests2.forEach(function(relativeTest) {
373376
const a = url.resolve(relativeTest[1], relativeTest[0]);

0 commit comments

Comments
 (0)