Added test that credential channel argument is required

This commit is contained in:
murgatroid99 2015-07-27 15:54:13 -07:00
parent 954538063c
commit eda1e5fb01
1 changed files with 4 additions and 1 deletions

View File

@ -51,13 +51,16 @@ describe('channel', function() {
new grpc.Channel(5); new grpc.Channel(5);
}); });
}); });
it('should accept a credential for the second argument', function() { it('should require a credential for the second argument', function() {
assert.doesNotThrow(function() { assert.doesNotThrow(function() {
new grpc.Channel('hostname', insecureCreds); new grpc.Channel('hostname', insecureCreds);
}); });
assert.throws(function() { assert.throws(function() {
new grpc.Channel('hostname', 5); new grpc.Channel('hostname', 5);
}); });
assert.throws(function() {
new grpc.Channel('hostname');
});
}); });
it('should accept an object for the third argument', function() { it('should accept an object for the third argument', function() {
assert.doesNotThrow(function() { assert.doesNotThrow(function() {