@@ -347,22 +347,36 @@ describe('variants', () => {
347
347
expect ( addr . toString ( ) ) . to . equal ( str )
348
348
} )
349
349
350
+ it ( 'ip6 + udp + quic-v1 + ipfs' , ( ) => {
351
+ const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic-v1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC'
352
+ const addr = multiaddr ( str )
353
+ expect ( addr ) . to . have . property ( 'bytes' )
354
+ expect ( addr . toString ( ) ) . to . equal ( str . replace ( '/ipfs/' , '/p2p/' ) )
355
+ } )
356
+
357
+ it ( 'ip6 + udp + quic-v1 + p2p' , ( ) => {
358
+ const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic-v1/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC'
359
+ const addr = multiaddr ( str )
360
+ expect ( addr ) . to . have . property ( 'bytes' )
361
+ expect ( addr . toString ( ) ) . to . equal ( str )
362
+ } )
363
+
350
364
it ( 'ip6 webtransport' , ( ) => {
351
- const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic/webtransport'
365
+ const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic-v1 /webtransport'
352
366
const addr = multiaddr ( str )
353
367
expect ( addr ) . to . have . property ( 'bytes' )
354
368
expect ( addr . toString ( ) ) . to . equal ( str )
355
369
} )
356
370
357
371
it ( 'ip4 webtransport' , ( ) => {
358
- const str = '/ip4/1.2.3.4/udp/4001/quic/webtransport'
372
+ const str = '/ip4/1.2.3.4/udp/4001/quic-v1 /webtransport'
359
373
const addr = multiaddr ( str )
360
374
expect ( addr ) . to . have . property ( 'bytes' )
361
375
expect ( addr . toString ( ) ) . to . equal ( str )
362
376
} )
363
377
364
378
it ( 'webtransport with certhash' , ( ) => {
365
- const str = '/ip4/1.2.3.4/udp/4001/quic/webtransport/certhash/uEiAkH5a4DPGKUuOBjYw0CgwjvcJCJMD2K_1aluKR_tpevQ/certhash/uEiAfbgiymPP2_nX7Dgir8B4QkksjHp2lVuJZz0F79Be9JA/p2p/12D3KooWBdmLJjhpgJ9KZgLM3f894ff9xyBfPvPjFNn7MKJpyrC2'
379
+ const str = '/ip4/1.2.3.4/udp/4001/quic-v1 /webtransport/certhash/uEiAkH5a4DPGKUuOBjYw0CgwjvcJCJMD2K_1aluKR_tpevQ/certhash/uEiAfbgiymPP2_nX7Dgir8B4QkksjHp2lVuJZz0F79Be9JA/p2p/12D3KooWBdmLJjhpgJ9KZgLM3f894ff9xyBfPvPjFNn7MKJpyrC2'
366
380
const addr = multiaddr ( str )
367
381
expect ( addr ) . to . have . property ( 'bytes' )
368
382
expect ( addr . toString ( ) ) . to . equal ( str )
0 commit comments