Commit 19f448ac authored by Éloïs's avatar Éloïs
Browse files

[mod] test automatic addition of / in ws2p path

parent 8be7e98f
......@@ -9,6 +9,7 @@ describe('WS2P IP functions', () => {
assert.equal(WS2PCluster.getFullAddress('my.host.com', 80, undefined), 'ws://my.host.com:80')
assert.equal(WS2PCluster.getFullAddress('my.host.com', 443, null), 'wss://my.host.com:443')
assert.equal(WS2PCluster.getFullAddress('my.host.com', 80, '/'), 'ws://my.host.com:80/')
assert.equal(WS2PCluster.getFullAddress('my.host.com', 80, ' path'), 'ws://my.host.com:80/path')
assert.equal(WS2PCluster.getFullAddress('my.host.com', 80, '/path'), 'ws://my.host.com:80/path')
assert.equal(WS2PCluster.getFullAddress('my.host.com', 80, '/super/long/path'), 'ws://my.host.com:80/super/long/path')
})
......@@ -17,6 +18,7 @@ describe('WS2P IP functions', () => {
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 80, ''), 'ws://192.168.1.1:80')
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 443, ''), 'wss://192.168.1.1:443')
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 80, '/'), 'ws://192.168.1.1:80/')
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 80, ' path'), 'ws://192.168.1.1:80/path')
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 80, '/path'), 'ws://192.168.1.1:80/path')
assert.equal(WS2PCluster.getFullAddress('192.168.1.1', 80, '/super/long/path'), 'ws://192.168.1.1:80/super/long/path')
})
......@@ -25,6 +27,7 @@ describe('WS2P IP functions', () => {
assert.equal(WS2PCluster.getFullAddress('::1', 80, ''), 'ws://[::1]:80')
assert.equal(WS2PCluster.getFullAddress('::1', 443, ''), 'wss://[::1]:443')
assert.equal(WS2PCluster.getFullAddress('::1', 80, '/'), 'ws://[::1]:80/')
assert.equal(WS2PCluster.getFullAddress('::1', 80, ' path'), 'ws://[::1]:80/path')
assert.equal(WS2PCluster.getFullAddress('::1', 80, '/path'), 'ws://[::1]:80/path')
assert.equal(WS2PCluster.getFullAddress('::1', 80, '/super/long/path'), 'ws://[::1]:80/super/long/path')
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment