diff --git a/scripts/fiber/tests-failing.txt b/scripts/fiber/tests-failing.txt index 16dd1717af3..5be728bdf9e 100644 --- a/scripts/fiber/tests-failing.txt +++ b/scripts/fiber/tests-failing.txt @@ -110,7 +110,6 @@ src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js * should warn when using non-React functions in JSX src/renderers/shared/shared/__tests__/ReactUpdates-test.js -* should queue mount-ready handlers across different roots * marks top-level updates * throws in setState if the update callback is not a function * throws in replaceState if the update callback is not a function diff --git a/scripts/fiber/tests-passing.txt b/scripts/fiber/tests-passing.txt index a1401beb408..85498b39c69 100644 --- a/scripts/fiber/tests-passing.txt +++ b/scripts/fiber/tests-passing.txt @@ -1451,6 +1451,7 @@ src/renderers/shared/shared/__tests__/ReactUpdates-test.js * should not reconcile children passed via props * should flow updates correctly * should share reconcile transaction across different roots +* should queue mount-ready handlers across different roots * should flush updates in the correct order * should flush updates in the correct order across roots * should queue nested updates diff --git a/src/renderers/shared/shared/__tests__/ReactUpdates-test.js b/src/renderers/shared/shared/__tests__/ReactUpdates-test.js index a430c1923c2..31b9a84acfa 100644 --- a/src/renderers/shared/shared/__tests__/ReactUpdates-test.js +++ b/src/renderers/shared/shared/__tests__/ReactUpdates-test.js @@ -544,6 +544,8 @@ describe('ReactUpdates', () => { // componentDidUpdate handlers is called, B's DOM should already have been // updated. + var bContainer = document.createElement('div'); + var a; var b; @@ -558,7 +560,15 @@ describe('ReactUpdates', () => { } render() { - return
A{this.state.x}
; + var portal = null; + // If we're using Fiber, we use Portals instead to achieve this. + if (ReactDOMFeatureFlags.useFiber) { + portal = ReactDOM.unstable_createPortal( + b = n} />, + bContainer + ); + } + return
A{this.state.x}{portal}
; } } @@ -571,7 +581,9 @@ describe('ReactUpdates', () => { } a = ReactTestUtils.renderIntoDocument(); - b = ReactTestUtils.renderIntoDocument(); + if (!ReactDOMFeatureFlags.useFiber) { + ReactDOM.render( b = n} />, bContainer); + } ReactDOM.unstable_batchedUpdates(function() { a.setState({x: 1});