Skip to content

Commit

Permalink
test: expand test coverage for url.js
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jun-oka authored and Fishrock123 committed Oct 11, 2016
1 parent 72ed6aa commit c4f0bb2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/parallel/test-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,17 @@ var formatTests = {
search: '?foo=bar#1#2#3&abc=#4##5',
query: {},
pathname: '/'
},

// more than 255 characters in hostname which exceeds the limit
[`http://${'a'.repeat(255)}.com/node`]: {
href: 'http:///node',
protocol: 'http:',
slashes: true,
host: '',
hostname: '',
pathname: '/node',
path: '/node'
}
};
for (const u in formatTests) {
Expand Down

0 comments on commit c4f0bb2

Please sign in to comment.