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 <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
879d6663ea
commit
92bcc13be0
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user