diff --git a/packages/react/src/__tests__/ReactStrictMode-test.js b/packages/react/src/__tests__/ReactStrictMode-test.js index cd08b8ff6ea58..c0a4d59f3d135 100644 --- a/packages/react/src/__tests__/ReactStrictMode-test.js +++ b/packages/react/src/__tests__/ReactStrictMode-test.js @@ -1106,7 +1106,7 @@ describe('context legacy', () => { if (ReactFeatureFlags.consoleManagedByDevToolsDuringStrictMode) { it('does not disable logs for class double render', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1135,7 +1135,7 @@ describe('context legacy', () => { }); it('does not disable logs for class double ctor', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1167,7 +1167,7 @@ describe('context legacy', () => { }); it('does not disable logs for class double getDerivedStateFromProps', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1200,7 +1200,7 @@ describe('context legacy', () => { }); it('does not disable logs for class double shouldComponentUpdate', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1241,7 +1241,7 @@ describe('context legacy', () => { }); it('does not disable logs for class state updaters', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let inst; let count = 0; @@ -1279,7 +1279,7 @@ describe('context legacy', () => { }); it('does not disable logs for function double render', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; function Foo() { @@ -1306,7 +1306,7 @@ describe('context legacy', () => { }); } else { it('disable logs for class double render', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1335,7 +1335,7 @@ describe('context legacy', () => { }); it('disables logs for class double ctor', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1367,7 +1367,7 @@ describe('context legacy', () => { }); it('disable logs for class double getDerivedStateFromProps', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1400,7 +1400,7 @@ describe('context legacy', () => { }); it('disable logs for class double shouldComponentUpdate', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; class Foo extends React.Component { @@ -1440,7 +1440,7 @@ describe('context legacy', () => { }); it('disable logs for class state updaters', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let inst; let count = 0; @@ -1478,7 +1478,7 @@ describe('context legacy', () => { }); it('disable logs for function double render', async () => { - spyOnDevAndProd(console, 'log').mockImplementation(() => {}); + spyOnDevAndProd(console, 'log'); let count = 0; function Foo() {