@@ -162,21 +162,6 @@ test('Minimizes the number of subscription dispatches when multiple components a
162
162
withoutTestLifecycles : true ,
163
163
} )
164
164
165
- const onProfile : ProfilerOnRenderCallback = (
166
- id ,
167
- phase ,
168
- actualDuration ,
169
- baseDuration ,
170
- startTime ,
171
- commitTime
172
- ) => {
173
- console . table ( {
174
- phase,
175
- actualDuration,
176
- baseDuration,
177
- } )
178
- }
179
-
180
165
let getSubscriptionsA = ( ) =>
181
166
storeRef . store . getState ( ) . api . subscriptions [ 'a(undefined)' ]
182
167
@@ -199,50 +184,19 @@ test('Minimizes the number of subscription dispatches when multiple components a
199
184
return < > { listItems } </ >
200
185
}
201
186
202
- const start = Date . now ( )
203
-
204
- render (
205
- // <Profiler id="a" onRender={onProfile}>
206
- < ParentComponent /> ,
207
- // </Profiler>,
208
- {
209
- wrapper : storeRef . wrapper ,
210
- }
211
- )
212
-
213
- const afterRender = Date . now ( )
187
+ render ( < ParentComponent /> , {
188
+ wrapper : storeRef . wrapper ,
189
+ } )
214
190
215
191
jest . advanceTimersByTime ( 10 )
216
192
217
- const afterTimers1 = Date . now ( )
218
-
219
193
await waitFor ( ( ) => {
220
194
return screen . getAllByText ( / 4 2 / ) . length > 0
221
195
} )
222
196
223
- const afterScreen = Date . now ( )
224
-
225
197
await runAllTimers ( )
226
198
227
- const end = Date . now ( )
228
-
229
- const timeElapsed = end - start
230
- // const renderTime = afterRender - start
231
- // const timer1Time = afterTimers1 - afterRender
232
- // const screenTime = afterScreen - afterTimers1
233
- // const timer2Time = end - afterScreen
234
-
235
- // console.table({
236
- // timeElapsed,
237
- // renderTime,
238
- // timer1Time,
239
- // screenTime,
240
- // timer2Time,
241
- // })
242
-
243
- // console.log('Getting final subscriptions')
244
199
const subscriptions = getSubscriptionsA ( )
245
- // console.log(actionTypes)
246
200
247
201
expect ( Object . keys ( subscriptions ! ) . length ) . toBe ( NUM_LIST_ITEMS )
248
202
@@ -252,9 +206,4 @@ test('Minimizes the number of subscription dispatches when multiple components a
252
206
'api/internalSubscriptions/subscriptionsUpdated' ,
253
207
'api/executeQuery/fulfilled' ,
254
208
] )
255
-
256
- // Could be flaky in CI, but we'll see.
257
- // Currently seeing 800ms in local dev, 6300 without the batching fixes
258
- // console.log('Elapsed subscription time: ', timeElapsed)
259
- expect ( timeElapsed ) . toBeLessThan ( 1500 )
260
209
} , 25000 )
0 commit comments