Skip to content

Commit

Permalink
lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Sep 2, 2016
1 parent 6cc716b commit 9cf0c10
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/common/test/grpc-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ function fakeRetryRequest() {
return (retryRequestOverride || retryRequest).apply(null, arguments);
}

var grpcMetadataOverride;
var GrpcMetadataOverride;
var grpcLoadOverride;
var fakeGrpc = {
Metadata: function() {
return new (grpcMetadataOverride || grpc.Metadata)();
if (GrpcMetadataOverride) {
return new GrpcMetadataOverride();
}
return new grpc.Metadata();
},
load: function() {
return (grpcLoadOverride || grpc.load).apply(null, arguments);
Expand Down Expand Up @@ -118,7 +121,7 @@ describe('GrpcService', function() {
});

beforeEach(function() {
grpcMetadataOverride = null;
GrpcMetadataOverride = null;
retryRequestOverride = null;

googleProtoFilesOverride = function() {
Expand Down Expand Up @@ -243,7 +246,7 @@ describe('GrpcService', function() {
it('should default grpcMetadata to null', function() {
var fakeGrpcMetadata = {};

grpcMetadataOverride = function() {
GrpcMetadataOverride = function() {
return fakeGrpcMetadata;
};

Expand All @@ -262,7 +265,7 @@ describe('GrpcService', function() {
}
};

grpcMetadataOverride = function() {
GrpcMetadataOverride = function() {
return fakeGrpcMetadata;
};

Expand Down

0 comments on commit 9cf0c10

Please sign in to comment.