test: fix React.createContext mock

pull/11421/head
Wei Zhu 7 years ago
parent c25e8de736
commit 435d793d60

@ -1,11 +1,9 @@
import createReactContext from 'create-react-context/lib/implementation';
const React = require.requireActual('react');
if (!React.createContext) {
React.createContext = () => {
const Provider = ({ children }) => children;
const Consumer = ({ children }) => children();
return { Provider, Consumer };
};
React.createContext = createReactContext;
}
if (!React.createRef) {

Loading…
Cancel
Save