Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('ForEach should not fail if null children is provided', () => {
expect(React.Children.forEach(null, null, null)).toBe(undefined);
});
beforeEach(function() {
ReactChildren = React.Children;
});
beforeEach(function() {
onlyChild = React.Children.only;
WrapComponent = React.createClass({
render: function() {
return <div>{onlyChild(this.props.children, this.props.mapFn, this)}</div>;
}
});
});
render: function() {
return React.Children.only(this.props.children);
}
});