Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('Should return child in array', () => {
const divOne = <div>;
expect(Children.toArray(divOne)).toEqual([divOne]);
});
</div>
it('Should return empty array if its null/undef', () => {
const children = null;
expect(Children.toArray(children)).toEqual([]);
});
});
it('Should return array if its already array', () => {
const children = [<div>];
expect(Children.toArray(children)).toEqual(children);
});
</div>