@@ -1150,7 +1150,7 @@ describe('context legacy', () => {
1150
1150
1151
1151
if ( ReactFeatureFlags . consoleManagedByDevToolsDuringStrictMode ) {
1152
1152
it ( 'does not disable logs for class double render' , async ( ) => {
1153
- spyOnDevAndProd ( console , 'log' ) ;
1153
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1154
1154
1155
1155
let count = 0 ;
1156
1156
class Foo extends React . Component {
@@ -1179,7 +1179,7 @@ describe('context legacy', () => {
1179
1179
} ) ;
1180
1180
1181
1181
it ( 'does not disable logs for class double ctor' , async ( ) => {
1182
- spyOnDevAndProd ( console , 'log' ) ;
1182
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1183
1183
1184
1184
let count = 0 ;
1185
1185
class Foo extends React . Component {
@@ -1211,7 +1211,7 @@ describe('context legacy', () => {
1211
1211
} ) ;
1212
1212
1213
1213
it ( 'does not disable logs for class double getDerivedStateFromProps' , async ( ) => {
1214
- spyOnDevAndProd ( console , 'log' ) ;
1214
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1215
1215
1216
1216
let count = 0 ;
1217
1217
class Foo extends React . Component {
@@ -1244,7 +1244,7 @@ describe('context legacy', () => {
1244
1244
} ) ;
1245
1245
1246
1246
it ( 'does not disable logs for class double shouldComponentUpdate' , async ( ) => {
1247
- spyOnDevAndProd ( console , 'log' ) ;
1247
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1248
1248
1249
1249
let count = 0 ;
1250
1250
class Foo extends React . Component {
@@ -1285,7 +1285,7 @@ describe('context legacy', () => {
1285
1285
} ) ;
1286
1286
1287
1287
it ( 'does not disable logs for class state updaters' , async ( ) => {
1288
- spyOnDevAndProd ( console , 'log' ) ;
1288
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1289
1289
1290
1290
let inst ;
1291
1291
let count = 0 ;
@@ -1323,7 +1323,7 @@ describe('context legacy', () => {
1323
1323
} ) ;
1324
1324
1325
1325
it ( 'does not disable logs for function double render' , async ( ) => {
1326
- spyOnDevAndProd ( console , 'log' ) ;
1326
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1327
1327
1328
1328
let count = 0 ;
1329
1329
function Foo ( ) {
@@ -1350,7 +1350,7 @@ describe('context legacy', () => {
1350
1350
} ) ;
1351
1351
} else {
1352
1352
it ( 'disable logs for class double render' , async ( ) => {
1353
- spyOnDevAndProd ( console , 'log' ) ;
1353
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1354
1354
1355
1355
let count = 0 ;
1356
1356
class Foo extends React . Component {
@@ -1379,7 +1379,7 @@ describe('context legacy', () => {
1379
1379
} ) ;
1380
1380
1381
1381
it ( 'disables logs for class double ctor' , async ( ) => {
1382
- spyOnDevAndProd ( console , 'log' ) ;
1382
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1383
1383
1384
1384
let count = 0 ;
1385
1385
class Foo extends React . Component {
@@ -1411,7 +1411,7 @@ describe('context legacy', () => {
1411
1411
} ) ;
1412
1412
1413
1413
it ( 'disable logs for class double getDerivedStateFromProps' , async ( ) => {
1414
- spyOnDevAndProd ( console , 'log' ) ;
1414
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1415
1415
1416
1416
let count = 0 ;
1417
1417
class Foo extends React . Component {
@@ -1444,7 +1444,7 @@ describe('context legacy', () => {
1444
1444
} ) ;
1445
1445
1446
1446
it ( 'disable logs for class double shouldComponentUpdate' , async ( ) => {
1447
- spyOnDevAndProd ( console , 'log' ) ;
1447
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1448
1448
1449
1449
let count = 0 ;
1450
1450
class Foo extends React . Component {
@@ -1484,7 +1484,7 @@ describe('context legacy', () => {
1484
1484
} ) ;
1485
1485
1486
1486
it ( 'disable logs for class state updaters' , async ( ) => {
1487
- spyOnDevAndProd ( console , 'log' ) ;
1487
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1488
1488
1489
1489
let inst ;
1490
1490
let count = 0 ;
@@ -1522,7 +1522,7 @@ describe('context legacy', () => {
1522
1522
} ) ;
1523
1523
1524
1524
it ( 'disable logs for function double render' , async ( ) => {
1525
- spyOnDevAndProd ( console , 'log' ) ;
1525
+ spyOnDevAndProd ( console , 'log' ) . mockImplementation ( ( ) => { } ) ;
1526
1526
1527
1527
let count = 0 ;
1528
1528
function Foo ( ) {
0 commit comments