From 15cb33ac15625a0a8ba10e14f12bb71ab1a312fd Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Wed, 25 Jul 2018 13:27:40 +0100 Subject: [PATCH] test: add additional test cases License: MIT Signed-off-by: Alan Shaw --- test.js | 4 ++++ 1 file changed, 4 insertions(+) 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'],