aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/test/channel_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/test/channel_test.js')
-rw-r--r--src/node/test/channel_test.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/node/test/channel_test.js b/src/node/test/channel_test.js
index d81df2a36d..7163a5fb5e 100644
--- a/src/node/test/channel_test.js
+++ b/src/node/test/channel_test.js
@@ -34,7 +34,7 @@
'use strict';
var assert = require('assert');
-var grpc = require('bindings')('grpc.node');
+var grpc = require('bindings')('grpc_node');
/**
* This is used for testing functions with multiple asynchronous calls that
@@ -56,7 +56,7 @@ function multiDone(done, count) {
}
};
}
-var insecureCreds = grpc.Credentials.createInsecure();
+var insecureCreds = grpc.ChannelCredentials.createInsecure();
describe('channel', function() {
describe('constructor', function() {
@@ -104,6 +104,12 @@ describe('channel', function() {
new grpc.Channel('hostname', insecureCreds, {'key' : new Date()});
});
});
+ it('should succeed without the new keyword', function() {
+ assert.doesNotThrow(function() {
+ var channel = grpc.Channel('hostname', insecureCreds);
+ assert(channel instanceof grpc.Channel);
+ });
+ });
});
describe('close', function() {
var channel;