@@ -129,10 +129,10 @@ describe('ClientGrpcProxy', () => {
129129
130130 it ( 'should call native method' , ( ) => {
131131 const spy = sinon . spy ( obj , methodName ) ;
132- stream$ . subscribe (
133- ( ) => ( { } ) ,
134- ( ) => ( { } ) ,
135- ) ;
132+ stream$ . subscribe ( {
133+ next : ( ) => ( { } ) ,
134+ error : ( ) => ( { } ) ,
135+ } ) ;
136136
137137 expect ( spy . called ) . to . be . true ;
138138 } ) ;
@@ -156,10 +156,10 @@ describe('ClientGrpcProxy', () => {
156156
157157 it ( 'should subscribe to request upstream' , ( ) => {
158158 const upstreamSubscribe = sinon . spy ( upstream , 'subscribe' ) ;
159- stream$ . subscribe (
160- ( ) => ( { } ) ,
161- ( ) => ( { } ) ,
162- ) ;
159+ stream$ . subscribe ( {
160+ next : ( ) => ( { } ) ,
161+ error : ( ) => ( { } ) ,
162+ } ) ;
163163 upstream . next ( { test : true } ) ;
164164
165165 expect ( writeSpy . called ) . to . be . true ;
@@ -201,7 +201,12 @@ describe('ClientGrpcProxy', () => {
201201
202202 it ( 'propagates server errors' , ( ) => {
203203 const err = new Error ( 'something happened' ) ;
204- stream$ . subscribe ( dataSpy , errorSpy , completeSpy ) ;
204+ stream$ . subscribe ( {
205+ next : dataSpy ,
206+ error : errorSpy ,
207+ complete : completeSpy ,
208+ } ) ;
209+
205210 eventCallbacks . data ( 'a' ) ;
206211 eventCallbacks . data ( 'b' ) ;
207212 callMock . finished = true ;
@@ -219,7 +224,11 @@ describe('ClientGrpcProxy', () => {
219224 const grpcServerCancelErrMock = {
220225 details : 'Cancelled' ,
221226 } ;
222- const subscription = stream$ . subscribe ( dataSpy , errorSpy ) ;
227+ const subscription = stream$ . subscribe ( {
228+ next : dataSpy ,
229+ error : errorSpy ,
230+ } ) ;
231+
223232 eventCallbacks . data ( 'a' ) ;
224233 eventCallbacks . data ( 'b' ) ;
225234 subscription . unsubscribe ( ) ;
@@ -258,10 +267,10 @@ describe('ClientGrpcProxy', () => {
258267
259268 it ( 'should call native method' , ( ) => {
260269 const spy = sinon . spy ( obj , methodName ) ;
261- stream$ . subscribe (
262- ( ) => ( { } ) ,
263- ( ) => ( { } ) ,
264- ) ;
270+ stream$ . subscribe ( {
271+ next : ( ) => ( { } ) ,
272+ error : ( ) => ( { } ) ,
273+ } ) ;
265274
266275 expect ( spy . called ) . to . be . true ;
267276 } ) ;
@@ -298,10 +307,10 @@ describe('ClientGrpcProxy', () => {
298307
299308 it ( 'should subscribe to request upstream' , ( ) => {
300309 const upstreamSubscribe = sinon . spy ( upstream , 'subscribe' ) ;
301- stream$ . subscribe (
302- ( ) => ( { } ) ,
303- ( ) => ( { } ) ,
304- ) ;
310+ stream$ . subscribe ( {
311+ next : ( ) => ( { } ) ,
312+ error : ( ) => ( { } ) ,
313+ } ) ;
305314 upstream . next ( { test : true } ) ;
306315
307316 expect ( writeSpy . called ) . to . be . true ;
0 commit comments