@@ -463,7 +463,7 @@ describe("MessagePanel", function () {
463463 const events = mkCreationEvents ( ) ;
464464 const createEvent = events . find ( ( event ) => event . getType ( ) === "m.room.create" ) ! ;
465465 const encryptionEvent = events . find ( ( event ) => event . getType ( ) === "m.room.encryption" ) ! ;
466- client . getRoom . mockImplementation ( ( id ) => ( id === createEvent ! . getRoomId ( ) ? room : null ) ) ;
466+ jest . mocked ( client . getRoom ) . mockImplementation ( ( id ) => ( id === createEvent ! . getRoomId ( ) ? room : null ) ) ;
467467 TestUtilsMatrix . upsertRoomStateEvents ( room , events ) ;
468468
469469 const { container } = render (
@@ -513,7 +513,7 @@ describe("MessagePanel", function () {
513513 it ( "should hide read-marker at the end of creation event summary" , function ( ) {
514514 const events = mkCreationEvents ( ) ;
515515 const createEvent = events . find ( ( event ) => event . getType ( ) === "m.room.create" ) ;
516- client . getRoom . mockImplementation ( ( id ) => ( id === createEvent ! . getRoomId ( ) ? room : null ) ) ;
516+ jest . mocked ( client . getRoom ) . mockImplementation ( ( id ) => ( id === createEvent ! . getRoomId ( ) ? room : null ) ) ;
517517 TestUtilsMatrix . upsertRoomStateEvents ( room , events ) ;
518518
519519 const { container } = render (
@@ -785,7 +785,7 @@ describe("MessagePanel", function () {
785785 } ) ;
786786
787787 it ( "should set lastSuccessful=true on non-last event if last event is not eligible for special receipt" , ( ) => {
788- client . getRoom . mockImplementation ( ( id ) => ( id === room . roomId ? room : null ) ) ;
788+ jest . mocked ( client . getRoom ) . mockImplementation ( ( id ) => ( id === room . roomId ? room : null ) ) ;
789789 const events = [
790790 TestUtilsMatrix . mkMessage ( {
791791 event : true ,
@@ -815,7 +815,7 @@ describe("MessagePanel", function () {
815815 } ) ;
816816
817817 it ( "should set lastSuccessful=false on non-last event if last event has a receipt from someone else" , ( ) => {
818- client . getRoom . mockImplementation ( ( id ) => ( id === room . roomId ? room : null ) ) ;
818+ jest . mocked ( client . getRoom ) . mockImplementation ( ( id ) => ( id === room . roomId ? room : null ) ) ;
819819 const events = [
820820 TestUtilsMatrix . mkMessage ( {
821821 event : true ,
0 commit comments