Skip to content

Commit 069fa16

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`.
1 parent 055482c commit 069fa16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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:password@example.com',
370370
'https://user:password@example.com/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)