Skip to content

Commit

Permalink
remove portal changes from utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jgzuke committed Aug 18, 2018
1 parent 3bc5de2 commit 3920f29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions packages/enzyme-adapter-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"dependencies": {
"function.prototype.name": "^1.1.0",
"object.assign": "^4.1.0",
"prop-types": "^15.6.2",
"react-is": "^16.4.2"
"prop-types": "^15.6.2"
},
"peerDependencies": {
"react": "0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0"
Expand Down
10 changes: 0 additions & 10 deletions packages/enzyme-adapter-utils/src/Utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import functionName from 'function.prototype.name';
import {
Portal,
} from 'react-is';
import createMountWrapper from './createMountWrapper';
import createRenderWrapper from './createRenderWrapper';

Expand Down Expand Up @@ -110,10 +107,6 @@ export function displayNameOfNode(node) {

if (!type) return null;

if (type === Portal) {
return 'Portal';
}

return type.displayName || (typeof type === 'function' ? functionName(type) : type.name || type);
}

Expand All @@ -124,9 +117,6 @@ export function nodeTypeFromType(type) {
if (type && type.prototype && type.prototype.isReactComponent) {
return 'class';
}
if (type && type === Portal) {
return 'portal';
}
return 'function';
}

Expand Down

0 comments on commit 3920f29

Please sign in to comment.