Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove undocumented TestUtils methods #10681

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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