Skip to content

Commit 260ab26

Browse files
committed
fixed strict mode tests
1 parent 21a345a commit 260ab26

13 files changed

+348
-361
lines changed

packages/react-reconciler/src/ReactFiberReconciler.new.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import invariant from 'shared/invariant';
3737
import isArray from 'shared/isArray';
3838
import {
3939
enableSchedulingProfiler,
40-
enableConsoleLogsInDoubleRender,
40+
consoleManagedByDevToolsDuringStrictMode,
4141
} from 'shared/ReactFeatureFlags';
4242
import ReactSharedInternals from 'shared/ReactSharedInternals';
4343
import {getPublicInstance} from './ReactFiberHostConfig';
@@ -723,7 +723,7 @@ export function getIsStrictModeForDevtools() {
723723
export function setIsStrictModeForDevtools(newIsStrictMode: boolean) {
724724
isStrictMode = newIsStrictMode;
725725

726-
if (enableConsoleLogsInDoubleRender) {
726+
if (consoleManagedByDevToolsDuringStrictMode) {
727727
// We're in a test because Scheduler.unstable_yieldValue only exists
728728
// in SchedulerMock. To reduce the noise in strict mode tests,
729729
// suppress warnings and disable scheduler yielding during the double render

packages/react-reconciler/src/ReactFiberReconciler.old.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import invariant from 'shared/invariant';
3737
import isArray from 'shared/isArray';
3838
import {
3939
enableSchedulingProfiler,
40-
enableConsoleLogsInDoubleRender,
40+
consoleManagedByDevToolsDuringStrictMode,
4141
} from 'shared/ReactFeatureFlags';
4242
import ReactSharedInternals from 'shared/ReactSharedInternals';
4343
import {getPublicInstance} from './ReactFiberHostConfig';
@@ -723,7 +723,7 @@ export function getIsStrictModeForDevtools() {
723723
export function setIsStrictModeForDevtools(newIsStrictMode: boolean) {
724724
isStrictMode = newIsStrictMode;
725725

726-
if (enableConsoleLogsInDoubleRender) {
726+
if (consoleManagedByDevToolsDuringStrictMode) {
727727
// We're in a test because Scheduler.unstable_yieldValue only exists
728728
// in SchedulerMock. To reduce the noise in strict mode tests,
729729
// suppress warnings and disable scheduler yielding during the double render

0 commit comments

Comments
 (0)