diff --git a/compat/test/browser/portals.test.js b/compat/test/browser/portals.test.js index 1dba912b48..00343b23bf 100644 --- a/compat/test/browser/portals.test.js +++ b/compat/test/browser/portals.test.js @@ -428,4 +428,30 @@ describe('Portal', () => { expect(spyParent).to.be.calledOnce; expect(spy).to.be.calledOnce; }); + + it('should switch between non portal and portal node', () => { + let toggle; + const Modal = ({ children, open }) => open + ? createPortal(