test: add additional test cases

License: MIT
Signed-off-by: Alan Shaw <alan@tableflip.io>
This commit is contained in:
Alan Shaw 2018-07-25 13:27:40 +01:00
parent 4f9c8def1f
commit 15cb33ac15
No known key found for this signature in database
GPG Key ID: 101D1B7A03DFAD4C

View File

@ -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'],