Skip to content

Commit 4032b43

Browse files
committed
listening for error events in unit tests
1 parent e56bdbf commit 4032b43

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/common/grpc-service.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ describe('GrpcService', function() {
10771077
fakeStream.received_status = grpcError500;
10781078

10791079
fakeStream
1080+
.on('error', done)
10801081
.on('response', function(resp) {
10811082
assert.deepEqual(resp, GrpcService.GRPC_ERROR_CODE_TO_HTTP[2]);
10821083
done();
@@ -1098,6 +1099,7 @@ describe('GrpcService', function() {
10981099
};
10991100

11001101
fakeStream
1102+
.on('error', done)
11011103
.on('response', function(resp) {
11021104
assert.deepEqual(resp, GrpcService.GRPC_ERROR_CODE_TO_HTTP[0]);
11031105
done();

0 commit comments

Comments
 (0)