test: mock React.createRef

This commit is contained in:
Wei Zhu 2018-07-23 16:12:36 +08:00
parent d87899784b
commit c25e8de736

View File

@ -8,4 +8,13 @@ if (!React.createContext) {
};
}
if (!React.createRef) {
React.createRef = () => {
const ref = function setRef(node) {
ref.current = node;
};
return ref;
};
}
module.exports = React;