Clean up assertions on descriptors

By making this fail, we catch a lot of tests that are expecting rendered
instances but are actually operating on descriptors.
This commit is contained in:
Paul O'Shannessy
2014-03-27 13:17:39 -07:00
committed by Paul O’Shannessy
parent 976826aec0
commit fe9cecd507
+4
View File
@@ -74,6 +74,10 @@ var ReactTestUtils = {
if (!ReactComponent.isValidComponent(inst)) {
return false;
}
if (inst.__realComponentInstance) {
// This is a descriptor membrane
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;