@@ -893,8 +893,8 @@ describe('context legacy', () => {
893
893
ReactDOM . render ( < Root /> , container ) ;
894
894
} ) ;
895
895
896
- describe ( 'disableLogs ' , ( ) => {
897
- it ( 'disables logs once for class double render' , ( ) => {
896
+ describe ( 'no disable logs ' , ( ) => {
897
+ it ( 'does not disable logs for class double render' , ( ) => {
898
898
spyOnDevAndProd ( console , 'log' ) ;
899
899
900
900
let count = 0 ;
@@ -915,14 +915,14 @@ describe('context legacy', () => {
915
915
) ;
916
916
917
917
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
918
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
918
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
919
919
// Note: we should display the first log because otherwise
920
920
// there is a risk of suppressing warnings when they happen,
921
921
// and on the next render they'd get deduplicated and ignored.
922
922
expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
923
923
} ) ;
924
924
925
- it ( 'disables logs once for class double ctor' , ( ) => {
925
+ it ( 'does not disable logs for class double ctor' , ( ) => {
926
926
spyOnDevAndProd ( console , 'log' ) ;
927
927
928
928
let count = 0 ;
@@ -946,14 +946,14 @@ describe('context legacy', () => {
946
946
) ;
947
947
948
948
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
949
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
949
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
950
950
// Note: we should display the first log because otherwise
951
951
// there is a risk of suppressing warnings when they happen,
952
952
// and on the next render they'd get deduplicated and ignored.
953
953
expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
954
954
} ) ;
955
955
956
- it ( 'disables logs once for class double getDerivedStateFromProps' , ( ) => {
956
+ it ( 'does not disable logs for class double getDerivedStateFromProps' , ( ) => {
957
957
spyOnDevAndProd ( console , 'log' ) ;
958
958
959
959
let count = 0 ;
@@ -978,14 +978,14 @@ describe('context legacy', () => {
978
978
) ;
979
979
980
980
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
981
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
981
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
982
982
// Note: we should display the first log because otherwise
983
983
// there is a risk of suppressing warnings when they happen,
984
984
// and on the next render they'd get deduplicated and ignored.
985
985
expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
986
986
} ) ;
987
987
988
- it ( 'disables logs once for class double shouldComponentUpdate' , ( ) => {
988
+ it ( 'does not disable logs for class double shouldComponentUpdate' , ( ) => {
989
989
spyOnDevAndProd ( console , 'log' ) ;
990
990
991
991
let count = 0 ;
@@ -1017,14 +1017,14 @@ describe('context legacy', () => {
1017
1017
) ;
1018
1018
1019
1019
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1020
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1020
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
1021
1021
// Note: we should display the first log because otherwise
1022
1022
// there is a risk of suppressing warnings when they happen,
1023
1023
// and on the next render they'd get deduplicated and ignored.
1024
1024
expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
1025
1025
} ) ;
1026
1026
1027
- it ( 'disables logs once for class state updaters' , ( ) => {
1027
+ it ( 'does not disable logs for class state updaters' , ( ) => {
1028
1028
spyOnDevAndProd ( console , 'log' ) ;
1029
1029
1030
1030
let inst ;
@@ -1051,14 +1051,14 @@ describe('context legacy', () => {
1051
1051
} ) ;
1052
1052
1053
1053
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1054
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1054
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
1055
1055
// Note: we should display the first log because otherwise
1056
1056
// there is a risk of suppressing warnings when they happen,
1057
1057
// and on the next render they'd get deduplicated and ignored.
1058
1058
expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
1059
1059
} ) ;
1060
1060
1061
- it ( 'disables logs once for function double render' , ( ) => {
1061
+ it ( 'does not disable logs for function double render' , ( ) => {
1062
1062
spyOnDevAndProd ( console , 'log' ) ;
1063
1063
1064
1064
let count = 0 ;
@@ -1077,7 +1077,7 @@ describe('context legacy', () => {
1077
1077
) ;
1078
1078
1079
1079
expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1080
- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1080
+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
1081
1081
// Note: we should display the first log because otherwise
1082
1082
// there is a risk of suppressing warnings when they happen,
1083
1083
// and on the next render they'd get deduplicated and ignored.
0 commit comments