Skip to content

Commit

Permalink
test: webtransport with certhash (#276)
Browse files Browse the repository at this point in the history
This PR adds tests for real-world example of webtransport 
addr announced by Kubo 0.16.0-rc1 (with two certhashes).
  • Loading branch information
lidel authored Sep 27, 2022
1 parent 7efd9b6 commit 7b9950a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ describe('variants', () => {
expect(addr.toString()).to.equal(str)
})

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

it('webtransport with certhash', () => {
const str = '/ip4/1.2.3.4/udp/4001/quic/webtransport/certhash/uEiAkH5a4DPGKUuOBjYw0CgwjvcJCJMD2K_1aluKR_tpevQ/certhash/uEiAfbgiymPP2_nX7Dgir8B4QkksjHp2lVuJZz0F79Be9JA/p2p/12D3KooWBdmLJjhpgJ9KZgLM3f894ff9xyBfPvPjFNn7MKJpyrC2'
const addr = multiaddr(str)
expect(addr).to.have.property('bytes')
expect(addr.toString()).to.equal(str)
})

it('unix', () => {
const str = '/unix/a/b/c/d/e'
const addr = multiaddr(str)
Expand Down

0 comments on commit 7b9950a

Please sign in to comment.