From b9858ccfe062885fe6f595ed8ca726db65df6d91 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 12 Sep 2017 16:41:41 +0100 Subject: [PATCH] Remove undocumented TestUtils methods --- src/renderers/dom/test/ReactTestUtilsEntry.js | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/src/renderers/dom/test/ReactTestUtilsEntry.js b/src/renderers/dom/test/ReactTestUtilsEntry.js index eaf1389e058f8..1da5ea30e8d38 100644 --- a/src/renderers/dom/test/ReactTestUtilsEntry.js +++ b/src/renderers/dom/test/ReactTestUtilsEntry.js @@ -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 [];