Skip to content

Commit 9bf1835

Browse files
committed
add a test for net's stringify
1 parent eb9cd09 commit 9bf1835

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/plugs.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,21 @@ tape('net: do not crash if listen() fails', function(t) {
187187
})
188188
})
189189

190+
tape('net: stringify support external being a string', function(t) {
191+
var combined = Compose([
192+
Net({
193+
scope: 'public',
194+
port: 4853,
195+
host: 'localhost',
196+
external: 'scuttlebutt.nz'
197+
}),
198+
shs
199+
])
200+
var addr = combined.stringify('public')
201+
t.equals(addr, 'net:scuttlebutt.nz:4853~shs:' + keys.publicKey.toString('base64'))
202+
t.end()
203+
})
204+
190205
tape('combined, unix', function (t) {
191206
var combined = Compose([
192207
Unix({

0 commit comments

Comments
 (0)