@@ -83,6 +83,11 @@ describe('url', () => {
83
83
host : '2a05:d018:270:f400:6d8c:d425:c5f:97f3' ,
84
84
ipv6 : true
85
85
} ) ;
86
+
87
+ verifyUrl ( '[fe80::1%lo0]' , {
88
+ host : 'fe80::1%lo0' ,
89
+ ipv6 : true
90
+ } ) ;
86
91
} ) ;
87
92
88
93
it ( 'should parse URL with host name and query' , ( ) => {
@@ -159,6 +164,12 @@ describe('url', () => {
159
164
query : { animal : 'apa' } ,
160
165
ipv6 : true
161
166
} ) ;
167
+
168
+ verifyUrl ( '[fe80::1%lo0]?animal=apa' , {
169
+ host : 'fe80::1%lo0' ,
170
+ query : { animal : 'apa' } ,
171
+ ipv6 : true
172
+ } ) ;
162
173
} ) ;
163
174
164
175
it ( 'should parse URL with scheme, host name and query' , ( ) => {
@@ -248,6 +259,13 @@ describe('url', () => {
248
259
query : { animal : 'apa' } ,
249
260
ipv6 : true
250
261
} ) ;
262
+
263
+ verifyUrl ( 'bolt+routing://[fe80::1%lo0]?animal=apa' , {
264
+ scheme : 'bolt+routing' ,
265
+ host : 'fe80::1%lo0' ,
266
+ query : { animal : 'apa' } ,
267
+ ipv6 : true
268
+ } ) ;
251
269
} ) ;
252
270
253
271
it ( 'should parse URL with host name and port' , ( ) => {
@@ -324,6 +342,12 @@ describe('url', () => {
324
342
port : 7475 ,
325
343
ipv6 : true
326
344
} ) ;
345
+
346
+ verifyUrl ( '[fe80::1%lo0]:7475' , {
347
+ host : 'fe80::1%lo0' ,
348
+ port : 7475 ,
349
+ ipv6 : true
350
+ } ) ;
327
351
} ) ;
328
352
329
353
it ( 'should parse URL with scheme and host name' , ( ) => {
@@ -400,6 +424,12 @@ describe('url', () => {
400
424
host : '2a05:d018:270:f400:6d8c:d425:c5f:97f3' ,
401
425
ipv6 : true
402
426
} ) ;
427
+
428
+ verifyUrl ( 'bolt+routing://[fe80::1%lo0]' , {
429
+ scheme : 'bolt+routing' ,
430
+ host : 'fe80::1%lo0' ,
431
+ ipv6 : true
432
+ } ) ;
403
433
} ) ;
404
434
405
435
it ( 'should parse URL with scheme, host name and port' , ( ) => {
@@ -489,6 +519,13 @@ describe('url', () => {
489
519
port : 22 ,
490
520
ipv6 : true
491
521
} ) ;
522
+
523
+ verifyUrl ( 'wss://[fe80::1%lo0]:22' , {
524
+ scheme : 'wss' ,
525
+ host : 'fe80::1%lo0' ,
526
+ port : 22 ,
527
+ ipv6 : true
528
+ } ) ;
492
529
} ) ;
493
530
494
531
it ( 'should parse URL with scheme, host name, port and query' , ( ) => {
@@ -591,6 +628,14 @@ describe('url', () => {
591
628
query : { key1 : 'value1' , key2 : 'value2' } ,
592
629
ipv6 : true
593
630
} ) ;
631
+
632
+ verifyUrl ( 'https://[fe80::1%lo0]:4242?key1=value1' , {
633
+ scheme : 'https' ,
634
+ host : 'fe80::1%lo0' ,
635
+ port : 4242 ,
636
+ query : { key1 : 'value1' } ,
637
+ ipv6 : true
638
+ } ) ;
594
639
} ) ;
595
640
596
641
it ( 'should fail to parse URL without host' , ( ) => {
0 commit comments