test: test resolveObject with an empty path
Add a case to test an URL object that has no path at all for url.resolveObject
.
This test increases the coverage of lib/url.js
:
The following lines will be checked:
- https://github.com/nodejs/node/blob/055482c21e2df94446d9796949d1bb810e8331bf/lib/url.js#L846-L849
- https://github.com/nodejs/node/blob/055482c21e2df94446d9796949d1bb810e8331bf/lib/url.js#L853-L858
This PR was part of https://github.com/nodejs/node/pull/11395 that I created, and I separated a non-breaking change commit from #11395 to this PR. I will update #11395 later.
Checklist
-
make -j4 test
-
tests is included -
commit message follows commit guidelines
Affected core subsystem(s)
test