@@ -46,8 +46,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
4646 const publisherPromise = executeRpcPubSubSubscriptionPlan ( {
4747 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
4848 signal : abortController . signal ,
49- subscribeMethodName : 'thingSubscribe' ,
50- subscribeParams : [ ] ,
49+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
5150 unsubscribeMethodName : 'thingUnsubscribe' ,
5251 } ) ;
5352 await expect ( publisherPromise ) . rejects . toThrow ( ) ;
@@ -56,8 +55,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
5655 executeRpcPubSubSubscriptionPlan ( {
5756 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
5857 signal : abortController . signal ,
59- subscribeMethodName : 'thingSubscribe' ,
60- subscribeParams : [ ] ,
58+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
6159 unsubscribeMethodName : 'thingUnsubscribe' ,
6260 } ) . catch ( ( ) => { } ) ;
6361 expect ( mockChannel . on ) . toHaveBeenCalledWith ( 'error' , expect . any ( Function ) , {
@@ -69,8 +67,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
6967 executeRpcPubSubSubscriptionPlan ( {
7068 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
7169 signal : abortController . signal ,
72- subscribeMethodName : 'thingSubscribe' ,
73- subscribeParams : expectedParams ,
70+ subscribeRequest : { methodName : 'thingSubscribe' , params : expectedParams } ,
7471 unsubscribeMethodName : 'thingUnsubscribe' ,
7572 } ) . catch ( ( ) => { } ) ;
7673 expect ( mockSend ) . toHaveBeenCalledWith (
@@ -91,8 +88,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
9188 const publisherPromise = executeRpcPubSubSubscriptionPlan ( {
9289 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
9390 signal : abortController . signal ,
94- subscribeMethodName : 'thingSubscribe' ,
95- subscribeParams : [ ] ,
91+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
9692 unsubscribeMethodName : 'thingUnsubscribe' ,
9793 } ) ;
9894 await expect ( publisherPromise ) . rejects . toBe ( 'o no' ) ;
@@ -110,8 +106,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
110106 publisherPromise = executeRpcPubSubSubscriptionPlan ( {
111107 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
112108 signal : abortController . signal ,
113- subscribeMethodName : 'thingSubscribe' ,
114- subscribeParams : [ ] ,
109+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
115110 unsubscribeMethodName : 'thingUnsubscribe' ,
116111 } ) ;
117112 } ) ;
@@ -135,8 +130,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
135130 const publisherPromise = executeRpcPubSubSubscriptionPlan ( {
136131 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
137132 signal : abortController . signal ,
138- subscribeMethodName : 'thingSubscribe' ,
139- subscribeParams : [ ] ,
133+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
140134 unsubscribeMethodName : 'thingUnsubscribe' ,
141135 } ) ;
142136 await Promise . resolve ( ) ;
@@ -158,8 +152,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
158152 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
159153 responseTransformer : mockResponseTransformer ,
160154 signal : abortController . signal ,
161- subscribeMethodName : 'thingSubscribe' ,
162- subscribeParams : [ ] ,
155+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
163156 unsubscribeMethodName : 'thingUnsubscribe' ,
164157 } ) ;
165158 await jest . runAllTimersAsync ( ) ;
@@ -285,8 +278,7 @@ describe('executeRpcPubSubSubscriptionPlan', () => {
285278 executeRpcPubSubSubscriptionPlan ( {
286279 channel : mockChannel as RpcSubscriptionsChannel < unknown , unknown > ,
287280 signal : secondAbortController . signal ,
288- subscribeMethodName : 'thingSubscribe' ,
289- subscribeParams : [ ] ,
281+ subscribeRequest : { methodName : 'thingSubscribe' , params : [ ] } ,
290282 unsubscribeMethodName : 'thingUnsubscribe' ,
291283 } ) . catch ( ( ) => { } ) ;
292284 await jest . runAllTimersAsync ( ) ;
0 commit comments