Skip to content

Commit

Permalink
add additional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jun 25, 2021
1 parent 83162f0 commit 44ffbd6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions url/resources/setters_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,15 @@
"pathname": ""
}
},
{
"comment": "Non-special URLs with an empty host can have their paths erased",
"href": "foo:///some/path",
"new_value": "",
"expected": {
"href": "foo://",
"pathname": ""
}
},
{
"comment": "Path-only URLs cannot have their paths erased",
"href": "foo:/some/path",
Expand All @@ -1638,6 +1647,15 @@
"pathname": "/"
}
},
{
"comment": "Path-only URLs always have an initial slash",
"href": "foo:/some/path",
"new_value": "test",
"expected": {
"href": "foo:/test",
"pathname": "/test"
}
},
{
"href": "unix:/run/foo.socket?timeout=10",
"new_value": "/var/log/../run/bar.socket",
Expand Down

0 comments on commit 44ffbd6

Please sign in to comment.