Comparing version 0.9.10 to 0.9.11
@@ -103,2 +103,6 @@ var net = require('net'); | ||
function attachDnode() { | ||
if (!stream) { | ||
self.emit('error', new Error('Could not create a stream with this information ' + JSON.stringify(params))) | ||
return null | ||
} | ||
client = createClient(self.proto, stream); | ||
@@ -105,0 +109,0 @@ |
{ | ||
"name" : "dnode", | ||
"version" : "0.9.10", | ||
"version" : "0.9.11", | ||
"description" : "freestyle RPC", | ||
@@ -5,0 +5,0 @@ "main" : "./index.js", |
var dnode = require('../'); | ||
var sys = require('sys'); | ||
var test = require('tap').test; | ||
@@ -102,2 +101,13 @@ | ||
server.listen(port); | ||
}) | ||
}); | ||
test('bad connection string', function(t) { | ||
try { | ||
var client = dnode.connect('garbage', function (remote, conn) { | ||
assert.fail('should have been refused, very unlikely'); | ||
}); | ||
} catch (err) { | ||
t.ok(/Could not create a stream/.test(err.message)); | ||
t.end(); | ||
} | ||
}); |
var dnode = require('../') | ||
var test = require('tap').test; | ||
var util = require('util'); | ||
@@ -14,3 +15,3 @@ test('simple', function (t) { | ||
print : function (n,reply) { | ||
reply(sys.inspect(n)); | ||
reply(util.inspect(n)); | ||
}, | ||
@@ -17,0 +18,0 @@ }).listen(port); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147606
1806