Skip to content

Commit 17a1be6

Browse files
anonrigUlisesGascon
authored andcommitted
test: validate host with commas on url.parse
PR-URL: nodejs#48878 Refs: nodejs#48873 Refs: nodejs#48855 Refs: nodejs#48850 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 95aa487 commit 17a1be6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/parallel/test-url-parse-format.js

+16
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,22 @@ const parseTests = {
10071007
path: '/',
10081008
href: 'https://evil.com$.example.com/'
10091009
},
1010+
1011+
// Validate the output of hostname with commas.
1012+
'x://0.0,1.1/': {
1013+
protocol: 'x:',
1014+
slashes: true,
1015+
auth: null,
1016+
host: '0.0,1.1',
1017+
port: null,
1018+
hostname: '0.0,1.1',
1019+
hash: null,
1020+
search: null,
1021+
query: null,
1022+
pathname: '/',
1023+
path: '/',
1024+
href: 'x://0.0,1.1/'
1025+
}
10101026
};
10111027

10121028
for (const u in parseTests) {

0 commit comments

Comments
 (0)