Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/renderers/dom/fiber/__tests__/ReactDOMFiber-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ describe('ReactDOMFiber', () => {
var expectHTML = {ref: el => htmlEls.push(el)};
var expectMath = {ref: el => mathEls.push(el)};

var portal = function(tree) {
var usePortal = function(tree) {
return ReactDOM.unstable_createPortal(
tree,
document.createElement('div')
Expand Down Expand Up @@ -371,7 +371,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<svg {...expectSVG}>
<image {...expectSVG} />
{portal(
{usePortal(
<div {...expectHTML} />
)}
<image {...expectSVG} />
Expand All @@ -380,7 +380,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<math {...expectMath}>
<mi {...expectMath} />
{portal(
{usePortal(
<div {...expectHTML} />
)}
<mi {...expectMath} />
Expand All @@ -389,7 +389,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<div {...expectHTML}>
<p {...expectHTML} />
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
</svg>
Expand All @@ -404,7 +404,7 @@ describe('ReactDOMFiber', () => {
<div {...expectHTML}>
<math {...expectMath}>
<mi {...expectMath} />
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
</svg>
Expand All @@ -416,7 +416,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<math {...expectMath}>
<mi {...expectMath} />
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
<foreignObject {...expectSVG}>
Expand All @@ -434,9 +434,9 @@ describe('ReactDOMFiber', () => {
);
assertNamespacesMatch(
<div {...expectHTML}>
{portal(
{usePortal(
<svg {...expectSVG}>
{portal(
{usePortal(
<div {...expectHTML} />
)}
<image {...expectSVG} />
Expand All @@ -448,7 +448,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<svg {...expectSVG}>
<svg {...expectSVG}>
{portal(
{usePortal(
<div {...expectHTML} />
)}
<image {...expectSVG} />
Expand All @@ -461,7 +461,7 @@ describe('ReactDOMFiber', () => {
it('should keep track of namespace across portals (complex)', () => {
assertNamespacesMatch(
<div {...expectHTML}>
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
</svg>
Expand All @@ -484,7 +484,7 @@ describe('ReactDOMFiber', () => {
<svg {...expectSVG}>
<svg {...expectSVG}>
<image {...expectSVG} />
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
<svg {...expectSVG}>
Expand All @@ -496,7 +496,7 @@ describe('ReactDOMFiber', () => {
<image {...expectSVG} />
<foreignObject {...expectSVG}>
<p {...expectHTML} />
{portal(<p {...expectHTML} />)}
{usePortal(<p {...expectHTML} />)}
<p {...expectHTML} />
</foreignObject>
</svg>
Expand All @@ -510,15 +510,15 @@ describe('ReactDOMFiber', () => {
<svg {...expectSVG}>
<foreignObject {...expectSVG}>
<p {...expectHTML} />
{portal(
{usePortal(
<svg {...expectSVG}>
<image {...expectSVG} />
<svg {...expectSVG}>
<image {...expectSVG} />
<foreignObject {...expectSVG}>
<p {...expectHTML} />
</foreignObject>
{portal(<p {...expectHTML} />)}
{usePortal(<p {...expectHTML} />)}
</svg>
<image {...expectSVG} />
</svg>
Expand Down Expand Up @@ -605,7 +605,7 @@ describe('ReactDOMFiber', () => {
assertNamespacesMatch(
<svg {...expectSVG}>
<ErrorBoundary>
{portal(
{usePortal(
<div {...expectHTML}>
<math {...expectMath}>
<BrokenRender />)
Expand All @@ -617,7 +617,7 @@ describe('ReactDOMFiber', () => {
/*
* TODO: enable. Currently this leads to stack overflow
* but it might be a bug in error boundaries rather than SVG or portals.
portal(
usePortal(
<div {...expectHTML} />
)
*/
Expand Down