Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 28, 2020
1 parent 1918e3b commit ff6922f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion packages/react-dom/src/__tests__/ReactDOMFiber-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,16 @@ describe('ReactDOMFiber', () => {
expect(() => {
node.click();
}).toErrorDev(
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
gate(flags => flags.enableEagerRootListeners)
? [
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
]
: [
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
],
);
}
render() {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/forks/ReactFeatureFlags.www-dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const decoupleUpdatePriorityFromScheduler = __VARIANT__;
export const skipUnmountedBoundaries = __VARIANT__;
export const enablePassiveEventIntervention = __VARIANT__;
export const disableOnScrollBubbling = __VARIANT__;
export const enableEagerRootListeners = __VARIANT__;
export const enableEagerRootListeners = !__VARIANT__;

// Enable this flag to help with concurrent mode debugging.
// It logs information to the console about React scheduling, rendering, and commit phases.
Expand Down

0 comments on commit ff6922f

Please sign in to comment.