Skip to content

Commit

Permalink
In hindsight, suppressing console.log is probably a bad idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Silbermann committed Jan 30, 2024
1 parent e16d5ff commit ad10266
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/react/src/__tests__/ReactStrictMode-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit ad10266

Please sign in to comment.