Skip to content

Commit c4f0bb2

Browse files
jun-okaFishrock123
authored andcommitted
test: expand test coverage for url.js
Add url example with more than 255 characters in the hostname of the url. PR-URL: #8976 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com> Conflicts: test/parallel/test-url.js
1 parent 72ed6aa commit c4f0bb2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/parallel/test-url.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,17 @@ var formatTests = {
11891189
search: '?foo=bar#1#2#3&abc=#4##5',
11901190
query: {},
11911191
pathname: '/'
1192+
},
1193+
1194+
// more than 255 characters in hostname which exceeds the limit
1195+
[`http://${'a'.repeat(255)}.com/node`]: {
1196+
href: 'http:///node',
1197+
protocol: 'http:',
1198+
slashes: true,
1199+
host: '',
1200+
hostname: '',
1201+
pathname: '/node',
1202+
path: '/node'
11921203
}
11931204
};
11941205
for (const u in formatTests) {

0 commit comments

Comments
 (0)