Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test resolveObject with an empty path
Browse files Browse the repository at this point in the history
Add a case to test an URL object that has no path at all
for `url.resolveObject`.
watilde committed Mar 12, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 055482c commit 069fa16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-url-relative.js
Original file line number Diff line number Diff line change
@@ -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]);

0 comments on commit 069fa16

Please sign in to comment.