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>
  • Loading branch information
jun-oka authored and jasnell committed Oct 10, 2016
1 parent 77f8bdd commit 35fc386
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 @@ -1200,6 +1200,17 @@ var formatTests = {
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'
},

// https://github.com/nodejs/node/issues/3361
'file:///home/user': {
href: 'file:///home/user',
Expand Down

0 comments on commit 35fc386

Please sign in to comment.