Skip to content

Commit

Permalink
listening for error events in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
callmehiphop committed Jul 21, 2016
1 parent e56bdbf commit 4032b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/common/grpc-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@ describe('GrpcService', function() {
fakeStream.received_status = grpcError500;

fakeStream
.on('error', done)
.on('response', function(resp) {
assert.deepEqual(resp, GrpcService.GRPC_ERROR_CODE_TO_HTTP[2]);
done();
Expand All @@ -1098,6 +1099,7 @@ describe('GrpcService', function() {
};

fakeStream
.on('error', done)
.on('response', function(resp) {
assert.deepEqual(resp, GrpcService.GRPC_ERROR_CODE_TO_HTTP[0]);
done();
Expand Down

0 comments on commit 4032b43

Please sign in to comment.