File tree Expand file tree Collapse file tree 1 file changed +22
-16
lines changed
Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change 9090 await pageObjects . typeInSendBox ( '.' ) ;
9191
9292 // THEN: `useActiveTyping` should return both.
93- await expect ( renderWithFunction ( ( ) => Object . values ( useActiveTyping ( ) [ 0 ] ) ) ) . resolves . toEqual ( [
94- {
95- at : 600 ,
96- expireAt : 5600 ,
97- name : expect . any ( String ) ,
98- role : 'bot' ,
99- type : 'busy'
100- } ,
101- {
102- at : 600 ,
103- expireAt : 5600 ,
104- name : expect . any ( String ) ,
105- role : 'user' ,
106- type : 'busy'
107- }
108- ] ) ;
93+ const hookResult = await renderWithFunction ( ( ) => Object . values ( useActiveTyping ( ) [ 0 ] ) ) ;
94+
95+ expect ( hookResult ) . toHaveLength ( 2 ) ;
96+
97+ expect ( hookResult ) . toEqual (
98+ expect . arrayContaining ( [
99+ {
100+ at : 600 ,
101+ expireAt : 5600 ,
102+ name : expect . any ( String ) ,
103+ role : 'bot' ,
104+ type : 'busy'
105+ } ,
106+ {
107+ at : 600 ,
108+ expireAt : 5600 ,
109+ name : expect . any ( String ) ,
110+ role : 'user' ,
111+ type : 'busy'
112+ }
113+ ] )
114+ ) ;
109115 } ) ;
110116 </ script >
111117 </ body >
You can’t perform that action at this time.
0 commit comments