@@ -112,11 +112,13 @@ describe('updaters', () => {
112
112
root . render ( < Parent /> ) ;
113
113
} ) ;
114
114
expect ( allSchedulerTags ) . toEqual ( [ [ HostRoot ] ] ) ;
115
+ assertLog ( [ 'onCommitRoot' ] ) ;
115
116
116
117
await act ( ( ) => {
117
118
root . render ( < Parent /> ) ;
118
119
} ) ;
119
120
expect ( allSchedulerTags ) . toEqual ( [ [ HostRoot ] , [ HostRoot ] ] ) ;
121
+ assertLog ( [ 'onCommitRoot' ] ) ;
120
122
} ) ;
121
123
122
124
it ( 'should report a function component as the scheduler for a hooks update' , async ( ) => {
@@ -148,12 +150,13 @@ describe('updaters', () => {
148
150
expect ( scheduleForA ) . not . toBeNull ( ) ;
149
151
expect ( scheduleForB ) . not . toBeNull ( ) ;
150
152
expect ( allSchedulerTypes ) . toEqual ( [ [ null ] ] ) ;
153
+ assertLog ( [ 'onCommitRoot' ] ) ;
151
154
152
155
await act ( ( ) => {
153
156
scheduleForA ( ) ;
154
157
} ) ;
155
158
expect ( allSchedulerTypes ) . toEqual ( [ [ null ] , [ SchedulingComponentA ] ] ) ;
156
-
159
+ assertLog ( [ 'onCommitRoot' ] ) ;
157
160
await act ( ( ) => {
158
161
scheduleForB ( ) ;
159
162
} ) ;
@@ -162,6 +165,7 @@ describe('updaters', () => {
162
165
[ SchedulingComponentA ] ,
163
166
[ SchedulingComponentB ] ,
164
167
] ) ;
168
+ assertLog ( [ 'onCommitRoot' ] ) ;
165
169
} ) ;
166
170
167
171
it ( 'should report a class component as the scheduler for a setState update' , async ( ) => {
@@ -180,7 +184,7 @@ describe('updaters', () => {
180
184
root . render ( < Parent /> ) ;
181
185
} ) ;
182
186
expect ( allSchedulerTypes ) . toEqual ( [ [ null ] ] ) ;
183
-
187
+ assertLog ( [ 'onCommitRoot' ] ) ;
184
188
expect ( instance ) . not . toBeNull ( ) ;
185
189
await act ( ( ) => {
186
190
instance . setState ( { } ) ;
0 commit comments