File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
src/__tests__/offline-support Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 8484 "path" : " 0.12.7" ,
8585 "react-native-markdown-package" : " 1.8.2" ,
8686 "react-native-url-polyfill" : " ^2.0.0" ,
87- "stream-chat" : " ^9.36.1 " ,
87+ "stream-chat" : " ^9.40.0 " ,
8888 "use-sync-external-store" : " ^1.5.0"
8989 },
9090 "peerDependencies" : {
Original file line number Diff line number Diff line change @@ -461,9 +461,9 @@ export const OptimisticUpdates = () => {
461461 } ) ;
462462 } ) ;
463463
464- it ( 'should rollback the optimistic edit if the request fails and no replayable task exists ' , async ( ) => {
464+ it ( 'should keep the optimistic edit if the request fails' , async ( ) => {
465465 const message = channel . state . messages [ 0 ] ;
466- const originalText = message . text ;
466+ const editedText = 'should stay optimistic' ;
467467
468468 render (
469469 < Chat client = { chatClient } enableOfflineSupport >
@@ -480,7 +480,7 @@ export const OptimisticUpdates = () => {
480480 localMessage : {
481481 ...message ,
482482 cid : channel . cid ,
483- text : 'should rollback' ,
483+ text : editedText ,
484484 } ,
485485 options : { } ,
486486 } ) ;
@@ -504,9 +504,9 @@ export const OptimisticUpdates = () => {
504504 const dbMessages = await BetterSqlite . selectFromTable ( 'messages' ) ;
505505 const dbMessage = dbMessages . find ( ( row ) => row . id === message . id ) ;
506506
507- expect ( updatedMessage . text ) . toBe ( originalText ) ;
507+ expect ( updatedMessage . text ) . toBe ( editedText ) ;
508508 expect ( pendingTasksRows ) . toHaveLength ( 0 ) ;
509- expect ( dbMessage . text ) . toBe ( originalText ) ;
509+ expect ( dbMessage . text ) . toBe ( editedText ) ;
510510 } ) ;
511511 } ) ;
512512
Original file line number Diff line number Diff line change @@ -8352,10 +8352,10 @@ stdin-discarder@^0.2.2:
83528352 resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be"
83538353 integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==
83548354
8355- stream-chat@^9.36.1 :
8356- version "9.36.2 "
8357- resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.36.2 .tgz#cd2cfac1f8d7b045c34dce51e2de1cb66bf288f5 "
8358- integrity sha512-sSCxTXJOf0BLDMZ2/cqvFged/LLbiWoIhs7v3UsRj0EM0T8tTam7zpU77TSccNDlK5j1C1/llSUVyMLc7aCDsA ==
8355+ stream-chat@^9.40.0 :
8356+ version "9.40.0 "
8357+ resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-9.40.0 .tgz#32ee29ae3442744fb7068b0ecaa3cc1a3b456b97 "
8358+ integrity sha512-IH3MdxS1zGwOob1dBqRTIqS7wB2Y6Spu4ufo4/yVKW/IFEYRs38BSLHcMsJISvUbPpBleXKIrUOQZu6VsgJpdw ==
83598359 dependencies :
83608360 " @types/jsonwebtoken" " ^9.0.8"
83618361 " @types/ws" " ^8.5.14"
You can’t perform that action at this time.
0 commit comments