Skip to content

Commit

Permalink
common-grpc: expose grpc (#2700)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop authored and stephenplusplus committed Oct 27, 2017
1 parent ea23b88 commit fe93f69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packages/common-grpc/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ exports.ServiceObject = require('./service-object.js');
* @type {module:commonGrpc/service}
*/
exports.Service = require('./service.js');

/**
* @type {module:commonGrpc/grpc}
*/
exports.grpc = require('grpc');
7 changes: 5 additions & 2 deletions packages/common-grpc/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var proxyquire = require('proxyquire');
var fakeOperation = {};
var fakeService = {};
var fakeServiceObject = {};
var fakeGrpc = {};

describe('grpc-common', function() {
var grpcCommon;
Expand All @@ -30,15 +31,17 @@ describe('grpc-common', function() {
grpcCommon = proxyquire('../src/index.js', {
'./operation.js': fakeOperation,
'./service.js': fakeService,
'./service-object.js': fakeServiceObject
'./service-object.js': fakeServiceObject,
grpc: fakeGrpc
});
});

it('should correctly export the common modules', function() {
assert.deepEqual(grpcCommon, {
Operation: fakeOperation,
Service: fakeService,
ServiceObject: fakeServiceObject
ServiceObject: fakeServiceObject,
grpc: fakeGrpc
});
});
});

0 comments on commit fe93f69

Please sign in to comment.