Skip to content

Commit 7b9950a

Browse files
authored
test: webtransport with certhash (#276)
This PR adds tests for real-world example of webtransport addr announced by Kubo 0.16.0-rc1 (with two certhashes).
1 parent 7efd9b6 commit 7b9950a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/index.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ describe('variants', () => {
347347
expect(addr.toString()).to.equal(str)
348348
})
349349

350-
it('webtransport', () => {
350+
it('ip6 webtransport', () => {
351351
const str = '/ip6/2001:8a0:7ac5:4201:3ac9:86ff:fe31:7095/udp/4001/quic/webtransport'
352352
const addr = multiaddr(str)
353353
expect(addr).to.have.property('bytes')
@@ -361,6 +361,13 @@ describe('variants', () => {
361361
expect(addr.toString()).to.equal(str)
362362
})
363363

364+
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'
366+
const addr = multiaddr(str)
367+
expect(addr).to.have.property('bytes')
368+
expect(addr.toString()).to.equal(str)
369+
})
370+
364371
it('unix', () => {
365372
const str = '/unix/a/b/c/d/e'
366373
const addr = multiaddr(str)

0 commit comments

Comments
 (0)