Remove undocumented TestUtils methods (#10681)
Dan Abramov committed
Sep 12, 2017 at 16:50 UTC
18d6cb5ebe56e96c293e82e0c861ed9f19765671
1 file changed
-32
src/renderers/dom/test/ReactTestUtilsEntry.js
-32
@@ -197,38 +197,6 @@ var ReactTestUtils = {
197
return constructor === type;
198
},
199
200
- // TODO: deprecate? It's undocumented and unused.
201
- isCompositeComponentElement: function(inst) {
202
- if (!React.isValidElement(inst)) {
203
- return false;
204
- }
205
- // We check the prototype of the type that will get mounted, not the
206
- // instance itself. This is a future proof way of duck typing.
207
- var prototype = inst.type.prototype;
208
- return (
209
- typeof prototype.render === 'function' &&
210
- typeof prototype.setState === 'function'
211
- );
212
- },
213
-
214
- // TODO: deprecate? It's undocumented and unused.
215
- isCompositeComponentElementWithType: function(inst, type) {
216
- var internalInstance = ReactInstanceMap.get(inst);
217
- var constructor = internalInstance._currentElement.type;
218
-
219
- return !!(ReactTestUtils.isCompositeComponentElement(inst) &&
220
- constructor === type);
221
- },
222
-
223
- // TODO: deprecate? It's undocumented and unused.
224
- getRenderedChildOfCompositeComponent: function(inst) {
225
- if (!ReactTestUtils.isCompositeComponent(inst)) {
226
- return null;
227
- }
228
- var internalInstance = ReactInstanceMap.get(inst);
229
- return internalInstance._renderedComponent.getPublicInstance();
230
- },
231
-
200
findAllInRenderedTree: function(inst, test) {
201
if (!inst) {
202
return [];