Add getWrappedComponent util and consume in tests

This commit is contained in:
2019-07-25 08:54:17 +05:30
parent 0bf27b7016
commit ae0e39ab80
2 changed files with 15 additions and 9 deletions
+12
View File
@@ -0,0 +1,12 @@
import React from "react";
function getWrappedComponent(SomeComponent: React.ElementType) {
class WrappedC extends React.Component {
render() {
return <SomeComponent />;
}
}
return WrappedC;
}
export default getWrappedComponent;