From 8eb192b92f78ca10a2ed840484e871cf5cfdacc8 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 8 Dec 2016 20:19:52 +0000 Subject: [PATCH] Enable additional (failing) portal tests --- scripts/fiber/tests-failing.txt | 4 +++ scripts/fiber/tests-passing.txt | 2 -- .../dom/fiber/__tests__/ReactDOMFiber-test.js | 25 ++++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/scripts/fiber/tests-failing.txt b/scripts/fiber/tests-failing.txt index 8d705c30e8..04626aca6a 100644 --- a/scripts/fiber/tests-failing.txt +++ b/scripts/fiber/tests-failing.txt @@ -18,6 +18,10 @@ src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js src/renderers/dom/__tests__/ReactDOMProduction-test.js * should throw with an error code in production +src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js +* should keep track of namespace across portals (medium) +* should unwind namespaces on caught errors in a portal + src/renderers/dom/shared/__tests__/ReactDOM-test.js * throws in render() if the mount callback is not a function * throws in render() if the update callback is not a function diff --git a/scripts/fiber/tests-passing.txt b/scripts/fiber/tests-passing.txt index 7143e78caa..119983286a 100644 --- a/scripts/fiber/tests-passing.txt +++ b/scripts/fiber/tests-passing.txt @@ -515,11 +515,9 @@ src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js * should render many portals * should render nested portals * should keep track of namespace across portals (simple) -* should keep track of namespace across portals (medium) * should keep track of namespace across portals (complex) * should unwind namespaces on uncaught errors * should unwind namespaces on caught errors -* should unwind namespaces on caught errors in a portal * should pass portal context when rendering subtree elsewhere * should update portal context if it changes due to setState * should update portal context if it changes due to re-render diff --git a/src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js b/src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js index 29f01844bc..fd20ef8a8c 100644 --- a/src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js +++ b/src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js @@ -400,6 +400,19 @@ describe('ReactDOMFiber', () => { }); it('should keep track of namespace across portals (medium)', () => { + assertNamespacesMatch( + + + {usePortal( +
+ )} + + {usePortal( +
+ )} + + + ); assertNamespacesMatch(
@@ -613,15 +626,9 @@ describe('ReactDOMFiber', () => {
)} - { - /* - * TODO: enable. Currently this leads to stack overflow - * but it might be a bug in error boundaries rather than SVG or portals. - usePortal( -
- ) - */ - } + {usePortal( +
+ )} ); });