diff --git a/tests/__mocks__/react.js b/tests/__mocks__/react.js index 072da8061c..b5a0a7321e 100644 --- a/tests/__mocks__/react.js +++ b/tests/__mocks__/react.js @@ -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;