Comparing version 0.8.8 to 0.9.0
@@ -74,5 +74,7 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
Client.prototype.invoke = function(method /*, args..., callback*/) { | ||
var self = this; | ||
var callback = arguments.length > 1 ? arguments[arguments.length - 1] : function() {}; | ||
var args = Array.prototype.slice.call(arguments, 1, arguments.length - 1); | ||
var self = this, | ||
hasCallback = typeof arguments[arguments.length - 1] == 'function', | ||
callback = hasCallback ? arguments[arguments.length - 1] : function() {}, | ||
args = Array.prototype.slice.call(arguments, 1, | ||
hasCallback ? arguments.length - 1 : arguments.length); | ||
@@ -79,0 +81,0 @@ var callbackErrorWrapper = function(error) { |
@@ -171,4 +171,2 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
return ch.close(); | ||
} else if(event.args.length != self._methods[event.name].length) { | ||
return sendError(new Error("Invalid number of arguments")); | ||
} | ||
@@ -175,0 +173,0 @@ |
{ | ||
"name": "zerorpc", | ||
"version": "0.8.8", | ||
"version": "0.9.0", | ||
"main": "./index.js", | ||
@@ -5,0 +5,0 @@ "author": "dotCloud <opensource@dotcloud.com>", |
@@ -68,3 +68,3 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
if(!killed) { | ||
ok(false, "Connection not closed on the remote end"); | ||
test.ok(false, "Connection not closed on the remote end"); | ||
} | ||
@@ -71,0 +71,0 @@ |
@@ -84,14 +84,2 @@ // Open Source Initiative OSI - The MIT License (MIT):Licensing | ||
exports.testIncorrectArgumentCount = function(test) { | ||
test.expect(4); | ||
rpcClient.invoke("addMan", function(error, res, more) { | ||
test.ok(error); | ||
test.equal(error.message, "Invalid number of arguments"); | ||
test.equal(res, null); | ||
test.equal(more, false); | ||
test.done(); | ||
}); | ||
}; | ||
exports.testNonExistentMethod = function(test) { | ||
@@ -98,0 +86,0 @@ test.expect(3); |
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
56797
1267