@@ -82,18 +82,20 @@ jest.mock('@rocket.chat/media-signaling', () => ({
8282 MediaCallWebRTCProcessor : jest . fn ( ) . mockImplementation ( function MediaCallWebRTCProcessor ( this : unknown ) {
8383 return this ;
8484 } ) ,
85- MediaSignalingSession : jest . fn ( ) . mockImplementation ( function MockMediaSignalingSession ( this : MockMediaSignalingSession , config : { userId : string } ) {
86- const endSession = jest . fn ( ) ;
87- this . userId = config . userId ;
88- this . endSession = endSession ;
89- this . on = jest . fn ( ) ;
90- this . processSignal = jest . fn ( ) . mockResolvedValue ( undefined ) ;
91- this . setIceGatheringTimeout = jest . fn ( ) ;
92- this . startCall = jest . fn ( ) . mockResolvedValue ( undefined ) ;
93- this . getMainCall = jest . fn ( ) ;
94- Object . defineProperty ( this , 'sessionId' , { value : `session-${ config . userId } ` , writable : false } ) ;
95- createdSessions . push ( this ) ;
96- } )
85+ MediaSignalingSession : jest
86+ . fn ( )
87+ . mockImplementation ( function MockMediaSignalingSession ( this : MockMediaSignalingSession , config : { userId : string } ) {
88+ const endSession = jest . fn ( ) ;
89+ this . userId = config . userId ;
90+ this . endSession = endSession ;
91+ this . on = jest . fn ( ) ;
92+ this . processSignal = jest . fn ( ) . mockResolvedValue ( undefined ) ;
93+ this . setIceGatheringTimeout = jest . fn ( ) ;
94+ this . startCall = jest . fn ( ) . mockResolvedValue ( undefined ) ;
95+ this . getMainCall = jest . fn ( ) ;
96+ Object . defineProperty ( this , 'sessionId' , { value : `session-${ config . userId } ` , writable : false } ) ;
97+ createdSessions . push ( this ) ;
98+ } )
9799} ) ) ;
98100
99101function getStreamNotifyHandler ( ) : ( ddpMessage : IDDPMessage ) => void {
@@ -151,7 +153,6 @@ describe('MediaSessionInstance', () => {
151153 ) ;
152154 spy . mockRestore ( ) ;
153155 } ) ;
154-
155156 } ) ;
156157
157158 describe ( 'teardown and user switch' , ( ) => {
0 commit comments