mirror of https://github.com/grpc/grpc-node.git
Merge branch 'master' into jenkins_test_reports
This commit is contained in:
commit
b2583e561a
|
@ -912,6 +912,9 @@ exports.makeClientConstructor = function(methods, serviceName,
|
|||
}
|
||||
// Associate all provided attributes with the method
|
||||
_.assign(ServiceClient.prototype[name], attrs);
|
||||
if (attrs.originalName) {
|
||||
ServiceClient.prototype[attrs.originalName] = ServiceClient.prototype[name];
|
||||
}
|
||||
});
|
||||
|
||||
ServiceClient.service = methods;
|
||||
|
|
|
@ -215,6 +215,10 @@ describe('Client constructor building', function() {
|
|||
grpc.makeGenericClientConstructor(illegal_service_attrs);
|
||||
}, /\$/);
|
||||
});
|
||||
it('Should add aliases for original names', function() {
|
||||
var Client = grpc.makeGenericClientConstructor(mathServiceAttrs);
|
||||
assert.strictEqual(Client.prototype.add, Client.prototype.Add);
|
||||
});
|
||||
});
|
||||
describe('waitForClientReady', function() {
|
||||
var server;
|
||||
|
|
Loading…
Reference in New Issue