Skip to content

Commit

Permalink
Remove undocumented TestUtils methods (facebook#10681)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Sep 12, 2017
1 parent 89508f2 commit 18d6cb5
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 @@ -197,38 +197,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.
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.
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 18d6cb5

Please sign in to comment.