diff --git a/test.js b/test.js index 435bc1c..a83bd7b 100644 --- a/test.js +++ b/test.js @@ -8,6 +8,8 @@ test('should convert multiaddr to URI', (t) => { ['/ip6/fc00::', 'fc00::'], ['/ip6/fc00::/http', 'http://fc00::'], ['/ip4/0.0.7.6/tcp/1234', 'tcp://0.0.7.6:1234'], + ['/ip4/0.0.7.6/tcp/1234/http', 'http://0.0.7.6:1234'], + ['/ip4/0.0.7.6/tcp/1234/https', 'https://0.0.7.6:1234'], ['/ip6/::/tcp/0', 'tcp://:::0'], ['/ip4/0.0.7.6/udp/1234', 'udp://0.0.7.6:1234'], ['/ip6/::/udp/0', 'udp://:::0'], @@ -18,6 +20,8 @@ test('should convert multiaddr to URI', (t) => { ['/dns4/protocol.ai/tcp/80', 'tcp://protocol.ai:80'], ['/dns6/protocol.ai/tcp/80', 'tcp://protocol.ai:80'], ['/dnsaddr/protocol.ai/tcp/80', 'tcp://protocol.ai:80'], + ['/dnsaddr/protocol.ai/tcp/80/http', 'http://protocol.ai:80'], + ['/dnsaddr/protocol.ai/tcp/80/https', 'https://protocol.ai:80'], ['/dnsaddr/ipfs.io/ws', 'ws://ipfs.io'], ['/dnsaddr/ipfs.io/http', 'http://ipfs.io'], ['/dnsaddr/ipfs.io/https', 'https://ipfs.io'],