@@ -885,14 +885,13 @@ describe('ReactHooksWithNoopRenderer', () => {
885
885
886
886
// we explicitly wait for missing act() warnings here since
887
887
// it's a lot harder to simulate this condition inside an act scope
888
- // todo - is this ok?
889
888
expect ( ( ) => {
890
889
ReactNoop . render ( < Counter count = { 0 } /> , ( ) =>
891
890
Scheduler . yieldValue ( 'Sync effect' ) ,
892
891
) ;
893
892
expect ( Scheduler ) . toFlushAndYieldThrough ( [ 'Count: 0' , 'Sync effect' ] ) ;
894
893
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Count: 0' ) ] ) ;
895
- } ) . toWarnDev ( [ 'Your test just caused an effect from Counter ' ] ) ;
894
+ } ) . toWarnDev ( [ 'An update to Counter ran an effect' ] ) ;
896
895
897
896
// A discrete event forces the passive effect to be flushed --
898
897
// updateCount(1) happens first, so 2 wins.
@@ -907,8 +906,8 @@ describe('ReactHooksWithNoopRenderer', () => {
907
906
expect ( ( ) => {
908
907
expect ( Scheduler ) . toFlushAndYield ( [ 'Count: 2' ] ) ;
909
908
} ) . toWarnDev ( [
910
- 'Your test just caused an effect from Counter ' ,
911
- 'Your test just caused an effect from Counter ' ,
909
+ 'An update to Counter ran an effect' ,
910
+ 'An update to Counter ran an effect' ,
912
911
] ) ;
913
912
914
913
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Count: 2' ) ] ) ;
@@ -943,7 +942,6 @@ describe('ReactHooksWithNoopRenderer', () => {
943
942
const tracingEvent = { id : 0 , name : 'hello' , timestamp : 0 } ;
944
943
// we explicitly wait for missing act() warnings here since
945
944
// it's a lot harder to simulate this condition inside an act scope
946
- // todo - is this ok?
947
945
expect ( ( ) => {
948
946
SchedulerTracing . unstable_trace (
949
947
tracingEvent . name ,
@@ -956,7 +954,7 @@ describe('ReactHooksWithNoopRenderer', () => {
956
954
) ;
957
955
expect ( Scheduler ) . toFlushAndYieldThrough ( [ 'Count: 0' , 'Sync effect' ] ) ;
958
956
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Count: 0' ) ] ) ;
959
- } ) . toWarnDev ( [ 'Your test just caused an effect from Counter ' ] ) ;
957
+ } ) . toWarnDev ( [ 'An update to Counter ran an effect' ] ) ;
960
958
961
959
expect ( onInteractionScheduledWorkCompleted ) . toHaveBeenCalledTimes ( 0 ) ;
962
960
@@ -973,8 +971,8 @@ describe('ReactHooksWithNoopRenderer', () => {
973
971
expect ( ( ) => {
974
972
expect ( Scheduler ) . toFlushAndYield ( [ 'Count: 2' ] ) ;
975
973
} ) . toWarnDev ( [
976
- 'Your test just caused an effect from Counter ' ,
977
- 'Your test just caused an effect from Counter ' ,
974
+ 'An update to Counter ran an effect' ,
975
+ 'An update to Counter ran an effect' ,
978
976
] ) ;
979
977
980
978
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Count: 2' ) ] ) ;
0 commit comments