@@ -47,7 +47,13 @@ const ActiveChannelSetter = ({ activeChannel }) => {
4747} ;
4848
4949const user = generateUser ( { id : 'id' , name : 'name' } ) ;
50- const messages = [ generateMessage ( { user } ) ] ;
50+
51+ // create a full message state so we can properly test `loadMore`
52+ const messages = [ ] ;
53+ for ( let i = 0 ; i < 25 ; i ++ ) {
54+ messages . push ( generateMessage ( ) ) ;
55+ }
56+
5157const pinnedMessages = [ generateMessage ( { pinned : true , user } ) ] ;
5258
5359const renderComponent = ( props = { } , callback = ( ) => { } ) =>
@@ -289,7 +295,7 @@ describe('Channel', () => {
289295 openThread ( threadMessage ) ;
290296 threadHasAlreadyBeenOpened = true ;
291297 } else {
292- // if we opened it ourselves before, it means the thread was succesfully closed
298+ // if we opened it ourselves before, it means the thread was successfully closed
293299 threadHasClosed = true ;
294300 }
295301 } else {
@@ -539,7 +545,7 @@ describe('Channel', () => {
539545 ) ;
540546 } ) ;
541547
542- it ( 'should update messages passed into the updaetMessage callback' , async ( ) => {
548+ it ( 'should update messages passed into the updateMessage callback' , async ( ) => {
543549 const newText = 'something entirely different' ;
544550 const updatedMessage = { ...messages [ 0 ] , text : newText } ;
545551 let hasUpdated = false ;
0 commit comments