Browse Source

test: expand test coverage for url.js

Add url example with more than 255 characters in the hostname
of the url.

PR-URL: https://github.com/nodejs/node/pull/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
v6.x
Junshu Okamoto 9 years ago
committed by Jeremiah Senkpiel
parent
commit
c4f0bb237a
  1. 11
      test/parallel/test-url.js

11
test/parallel/test-url.js

@ -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) {

Loading…
Cancel
Save