@@ -13,7 +13,7 @@ vi.mock('@ably/chat/react', () => ({
1313 useRoomReactions : vi . fn ( ) . mockReturnValue ( {
1414 roomStatus : RoomStatus . Attached ,
1515 connectionStatus : ConnectionStatus . Connected ,
16- send : vi . fn ( ) . mockResolvedValue ( { } ) ,
16+ sendRoomReaction : vi . fn ( ) . mockResolvedValue ( { } ) ,
1717 } as Partial < UseRoomReactionsResponse > ) ,
1818} ) ) ;
1919
@@ -99,7 +99,7 @@ Object.defineProperty(navigator, 'vibrate', {
9999} ) ;
100100
101101describe ( 'RoomReaction' , ( ) => {
102- const mockSend = vi . fn ( ) . mockResolvedValue ( { } ) ;
102+ const mockSendRoomReaction = vi . fn ( ) . mockResolvedValue ( { } ) ;
103103
104104 beforeEach ( ( ) => {
105105 vi . clearAllMocks ( ) ;
@@ -133,15 +133,15 @@ describe('RoomReaction', () => {
133133 ( useRoomReactions as unknown as ReturnType < typeof vi . fn > ) . mockReturnValue ( {
134134 roomStatus : RoomStatus . Attached ,
135135 connectionStatus : ConnectionStatus . Connected ,
136- send : mockSend ,
136+ sendRoomReaction : mockSendRoomReaction ,
137137 } ) ;
138138
139139 render ( < RoomReaction /> ) ;
140140
141141 // Click the reaction button
142142 fireEvent . click ( screen . getByRole ( 'button' ) ) ;
143143
144- expect ( mockSend ) . toHaveBeenCalledWith ( { name : '👍' } ) ;
144+ expect ( mockSendRoomReaction ) . toHaveBeenCalledWith ( { name : '👍' } ) ;
145145
146146 // Check if emoji burst is shown
147147 expect ( screen . getByTestId ( 'emoji-burst' ) ) . toBeInTheDocument ( ) ;
@@ -188,7 +188,7 @@ describe('RoomReaction', () => {
188188 ( useRoomReactions as unknown as ReturnType < typeof vi . fn > ) . mockReturnValue ( {
189189 roomStatus : RoomStatus . Attached ,
190190 connectionStatus : ConnectionStatus . Connected ,
191- send : mockSend ,
191+ sendRoomReaction : mockSendRoomReaction ,
192192 } ) ;
193193
194194 render ( < RoomReaction /> ) ;
@@ -206,7 +206,7 @@ describe('RoomReaction', () => {
206206 expect ( screen . queryByTestId ( 'emoji-wheel' ) ) . not . toBeInTheDocument ( ) ;
207207
208208 // Check if the selected emoji was sent
209- expect ( mockSend ) . toHaveBeenCalledWith ( { name : '❤️' } ) ;
209+ expect ( mockSendRoomReaction ) . toHaveBeenCalledWith ( { name : '❤️' } ) ;
210210
211211 // Check if emoji burst is shown with the selected emoji
212212 expect ( screen . getByTestId ( 'emoji-burst' ) ) . toBeInTheDocument ( ) ;
@@ -279,7 +279,7 @@ describe('RoomReaction', () => {
279279 return {
280280 roomStatus : RoomStatus . Attached ,
281281 connectionStatus : ConnectionStatus . Connected ,
282- send : mockSend ,
282+ sendRoomReaction : mockSendRoomReaction ,
283283 } ;
284284 }
285285 ) ;
@@ -322,7 +322,7 @@ describe('RoomReaction', () => {
322322 return {
323323 roomStatus : RoomStatus . Attached ,
324324 connectionStatus : ConnectionStatus . Connected ,
325- send : mockSend ,
325+ sendRoomReaction : mockSendRoomReaction ,
326326 } ;
327327 }
328328 ) ;
@@ -436,7 +436,7 @@ describe('RoomReaction', () => {
436436 ( useRoomReactions as unknown as ReturnType < typeof vi . fn > ) . mockReturnValue ( {
437437 roomStatus : RoomStatus . Attached ,
438438 connectionStatus : ConnectionStatus . Connected ,
439- send : mockSendFailure ,
439+ sendRoomReaction : mockSendFailure ,
440440 } ) ;
441441
442442 render ( < RoomReaction onError = { { onSendRoomReactionError : mockOnSendRoomReactionError } } /> ) ;
@@ -462,7 +462,7 @@ describe('RoomReaction', () => {
462462 ( useRoomReactions as unknown as ReturnType < typeof vi . fn > ) . mockReturnValue ( {
463463 roomStatus : RoomStatus . Attached ,
464464 connectionStatus : ConnectionStatus . Connected ,
465- send : mockSendFailure ,
465+ sendRoomReaction : mockSendFailure ,
466466 } ) ;
467467
468468 render ( < RoomReaction /> ) ;
0 commit comments