@@ -134,11 +134,6 @@ describe('ReactIncrementalErrorHandling', () => {
134
134
'ErrorMessage' ,
135
135
] ) ;
136
136
137
- if ( enableNewScheduler ) {
138
- expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ ] ) ;
139
- Scheduler . flushAll ( ) ;
140
- }
141
-
142
137
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Caught an error: oops!' ) ] ) ;
143
138
} ) ;
144
139
@@ -342,23 +337,14 @@ describe('ReactIncrementalErrorHandling', () => {
342
337
// Finish the rest of the async work
343
338
expect ( Scheduler ) . toFlushAndYieldThrough ( [ 'Sibling' ] ) ;
344
339
345
- // React retries once, synchronously, before throwing.
346
- if ( enableNewScheduler ) {
347
- // New scheduler yields in between render and commit
348
- Scheduler . unstable_flushNumberOfYields ( 1 ) ;
349
- expect ( Scheduler ) . toHaveYielded ( [ 'Parent' , 'BadRender' , 'Sibling' ] ) ;
350
- // Error is thrown during commit
351
- expect ( ( ) => Scheduler . flushAll ( ) ) . toThrow ( 'oops' ) ;
352
- } else {
353
- // Old scheduler renders, commits, and throws synchronously
354
- expect ( ( ) => Scheduler . unstable_flushNumberOfYields ( 1 ) ) . toThrow ( 'oops' ) ;
355
- expect ( Scheduler ) . toHaveYielded ( [
356
- 'Parent' ,
357
- 'BadRender' ,
358
- 'Sibling' ,
359
- 'commit' ,
360
- ] ) ;
361
- }
340
+ // Old scheduler renders, commits, and throws synchronously
341
+ expect ( ( ) => Scheduler . unstable_flushNumberOfYields ( 1 ) ) . toThrow ( 'oops' ) ;
342
+ expect ( Scheduler ) . toHaveYielded ( [
343
+ 'Parent' ,
344
+ 'BadRender' ,
345
+ 'Sibling' ,
346
+ 'commit' ,
347
+ ] ) ;
362
348
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ ] ) ;
363
349
} ) ;
364
350
0 commit comments