mirror of
https://github.com/fluencelabs/js-multiaddr-to-uri
synced 2024-12-04 11:30:27 +00:00
test: add additional test cases
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
This commit is contained in:
parent
4f9c8def1f
commit
15cb33ac15
4
test.js
4
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'],
|
||||
|
Loading…
Reference in New Issue
Block a user