From c4f0bb237aa418787050af0fab9abbb94961ba20 Mon Sep 17 00:00:00 2001 From: Junshu Okamoto Date: Fri, 7 Oct 2016 13:02:12 -0700 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Ilkka Myller Reviewed-By: James M Snell Conflicts: test/parallel/test-url.js --- test/parallel/test-url.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index c1bd2a43d0..bf5bd25e27 100644 --- a/test/parallel/test-url.js +++ b/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) {