All files verify-react.js

100% Statements 8/8
100% Branches 8/8
100% Functions 2/2
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x           5x 1x     4x 7x 2x       2x 1x      
const REACT_FUNCTIONS = [
  'createElement',
  'isValidElement'
];
 
export default function verifyReact(React) {
  if (!React) {
    throw new Error(`[React Type Snob] \`React\` was not supplied!`);
  }
 
  REACT_FUNCTIONS.forEach((functionName) => {
    if (!React[functionName] || typeof React[functionName] !== 'function') {
      throw new Error(`[React Type Snob] \`React.${functionName}\` isn't a function - are you sure you called this with React?`);
    }
  });
 
  if (!React.Children) {
    throw new Error(`[React Type Snob] \`React.Children\` seems to be missing - are you sure you called this with React?`);
  }
}