test: url format path ending hashchar not covered

PR-URL: https://github.com/nodejs/node/pull/24259
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Osmond van Hemert authored and Shelley Vohr committed 2019-01-12 10:42:45 -08:00
1 parent 9970d562c6
commit aba7b47e5c
1 file changed
+10
+10
View File
@@ -173,6 +173,16 @@ const formatTests = {
hash: '#bar'
},
// `#` in path end + `#` in query
'/path/to/%%23?foo=the%231#bar': {
href: '/path/to/%%23?foo=the%231#bar',
pathname: '/path/to/%#',
query: {
foo: 'the#1'
},
hash: '#bar'
},
// `?` and `#` in path and search
'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag': {
href: 'http://ex.com/foo%3F100%m%23r?abc=the%231?&foo=bar#frag',