Skip to content

Commit

Permalink
Remvoe undocumented TestUtils methods that are broken in Fiber
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Aug 24, 2017
1 parent d773f15 commit 5827485
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/renderers/dom/test/ReactTestUtilsEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,38 +165,6 @@ var ReactTestUtils = {
return constructor === type;
},

// TODO: deprecate? It's undocumented and unused.
isCompositeComponentElement: function(inst) {
if (!React.isValidElement(inst)) {
return false;
}
// We check the prototype of the type that will get mounted, not the
// instance itself. This is a future proof way of duck typing.
var prototype = inst.type.prototype;
return (
typeof prototype.render === 'function' &&
typeof prototype.setState === 'function'
);
},

// TODO: deprecate? It's undocumented and unused. It's also broken.
isCompositeComponentElementWithType: function(inst, type) {
var internalInstance = ReactInstanceMap.get(inst);
var constructor = internalInstance._currentElement.type;

return !!(ReactTestUtils.isCompositeComponentElement(inst) &&
constructor === type);
},

// TODO: deprecate? It's undocumented and unused. It's also broken.
getRenderedChildOfCompositeComponent: function(inst) {
if (!ReactTestUtils.isCompositeComponent(inst)) {
return null;
}
var internalInstance = ReactInstanceMap.get(inst);
return internalInstance._renderedComponent.getPublicInstance();
},

findAllInRenderedTree: function(inst, test) {
if (!inst) {
return [];
Expand Down

0 comments on commit 5827485

Please sign in to comment.