Skip to content

Commit

Permalink
test: validate host with commas on url.parse
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
anonrig authored and Ceres6 committed Aug 14, 2023
1 parent 9749d75 commit ba96a46
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/parallel/test-url-parse-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,22 @@ const parseTests = {
path: '/',
href: 'https://evil.com$.example.com/'
},

// Validate the output of hostname with commas.
'x://0.0,1.1/': {
protocol: 'x:',
slashes: true,
auth: null,
host: '0.0,1.1',
port: null,
hostname: '0.0,1.1',
hash: null,
search: null,
query: null,
pathname: '/',
path: '/',
href: 'x://0.0,1.1/'
}
};

for (const u in parseTests) {
Expand Down

0 comments on commit ba96a46

Please sign in to comment.