Skip to content

Commit 27ce28c

Browse files
committed
add url host test: Port number is removed if new port is scheme default
Refs: nodejs/node#20479
1 parent 8b10545 commit 27ce28c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

url/setters_tests.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,17 @@
968968
"hostname": "test",
969969
"port": "12"
970970
}
971+
},
972+
{
973+
"comment": "Port number is removed if new port is scheme default",
974+
"href": "http://example.net:8080",
975+
"new_value": "example.com:80",
976+
"expected": {
977+
"href": "http://example.com/",
978+
"host": "example.com",
979+
"hostname": "example.com",
980+
"port": ""
981+
}
971982
}
972983
],
973984
"hostname": [

0 commit comments

Comments
 (0)