@@ -893,8 +893,8 @@ describe('context legacy', () => {
893893 ReactDOM . render ( < Root /> , container ) ;
894894 } ) ;
895895
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' , ( ) => {
898898 spyOnDevAndProd ( console , 'log' ) ;
899899
900900 let count = 0 ;
@@ -915,14 +915,14 @@ describe('context legacy', () => {
915915 ) ;
916916
917917 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
918- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
918+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
919919 // Note: we should display the first log because otherwise
920920 // there is a risk of suppressing warnings when they happen,
921921 // and on the next render they'd get deduplicated and ignored.
922922 expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
923923 } ) ;
924924
925- it ( 'disables logs once for class double ctor' , ( ) => {
925+ it ( 'does not disable logs for class double ctor' , ( ) => {
926926 spyOnDevAndProd ( console , 'log' ) ;
927927
928928 let count = 0 ;
@@ -946,14 +946,14 @@ describe('context legacy', () => {
946946 ) ;
947947
948948 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
949- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
949+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
950950 // Note: we should display the first log because otherwise
951951 // there is a risk of suppressing warnings when they happen,
952952 // and on the next render they'd get deduplicated and ignored.
953953 expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
954954 } ) ;
955955
956- it ( 'disables logs once for class double getDerivedStateFromProps' , ( ) => {
956+ it ( 'does not disable logs for class double getDerivedStateFromProps' , ( ) => {
957957 spyOnDevAndProd ( console , 'log' ) ;
958958
959959 let count = 0 ;
@@ -978,14 +978,14 @@ describe('context legacy', () => {
978978 ) ;
979979
980980 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
981- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
981+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
982982 // Note: we should display the first log because otherwise
983983 // there is a risk of suppressing warnings when they happen,
984984 // and on the next render they'd get deduplicated and ignored.
985985 expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
986986 } ) ;
987987
988- it ( 'disables logs once for class double shouldComponentUpdate' , ( ) => {
988+ it ( 'does not disable logs for class double shouldComponentUpdate' , ( ) => {
989989 spyOnDevAndProd ( console , 'log' ) ;
990990
991991 let count = 0 ;
@@ -1017,14 +1017,14 @@ describe('context legacy', () => {
10171017 ) ;
10181018
10191019 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1020- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1020+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
10211021 // Note: we should display the first log because otherwise
10221022 // there is a risk of suppressing warnings when they happen,
10231023 // and on the next render they'd get deduplicated and ignored.
10241024 expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
10251025 } ) ;
10261026
1027- it ( 'disables logs once for class state updaters' , ( ) => {
1027+ it ( 'does not disable logs for class state updaters' , ( ) => {
10281028 spyOnDevAndProd ( console , 'log' ) ;
10291029
10301030 let inst ;
@@ -1051,14 +1051,14 @@ describe('context legacy', () => {
10511051 } ) ;
10521052
10531053 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1054- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1054+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
10551055 // Note: we should display the first log because otherwise
10561056 // there is a risk of suppressing warnings when they happen,
10571057 // and on the next render they'd get deduplicated and ignored.
10581058 expect ( console . log ) . toBeCalledWith ( 'foo 1' ) ;
10591059 } ) ;
10601060
1061- it ( 'disables logs once for function double render' , ( ) => {
1061+ it ( 'does not disable logs for function double render' , ( ) => {
10621062 spyOnDevAndProd ( console , 'log' ) ;
10631063
10641064 let count = 0 ;
@@ -1077,7 +1077,7 @@ describe('context legacy', () => {
10771077 ) ;
10781078
10791079 expect ( count ) . toBe ( __DEV__ ? 2 : 1 ) ;
1080- expect ( console . log ) . toBeCalledTimes ( 1 ) ;
1080+ expect ( console . log ) . toBeCalledTimes ( __DEV__ ? 2 : 1 ) ;
10811081 // Note: we should display the first log because otherwise
10821082 // there is a risk of suppressing warnings when they happen,
10831083 // and on the next render they'd get deduplicated and ignored.
0 commit comments