Browse Source

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>
v6
Daijiro Wachi 8 years ago
parent
commit
92bcc13be0
  1. 3
      test/parallel/test-url-relative.js

3
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]);

Loading…
Cancel
Save