@@ -347,22 +347,36 @@ describe('variants', () => {
347347 expect ( addr . toString ( ) ) . to . equal ( str )
348348 } )
349349
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+
350364 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'
352366 const addr = multiaddr ( str )
353367 expect ( addr ) . to . have . property ( 'bytes' )
354368 expect ( addr . toString ( ) ) . to . equal ( str )
355369 } )
356370
357371 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'
359373 const addr = multiaddr ( str )
360374 expect ( addr ) . to . have . property ( 'bytes' )
361375 expect ( addr . toString ( ) ) . to . equal ( str )
362376 } )
363377
364378 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'
366380 const addr = multiaddr ( str )
367381 expect ( addr ) . to . have . property ( 'bytes' )
368382 expect ( addr . toString ( ) ) . to . equal ( str )
0 commit comments