import * as React from 'react'; import { childrenExist } from 'src/utils/childrenExist'; describe('childrenExist', () => { test('returns false when no children are passed', () => { const { props } =
; expect(childrenExist(props.children)).toBe(false); }); test('returns true with text child', () => { const { props } =
text
; expect(childrenExist(props.children)).toBe(true); }); test('returns true with empty child element', () => { const { props } = (

); expect(childrenExist(props.children)).toBe(true); }); test('returns true with child element', () => { const { props } = (

text

); expect(childrenExist(props.children)).toBe(true); }); test('returns false for null expression', () => { const { props } =
{null}
; expect(childrenExist(props.children)).toBe(false); }); test('returns false for void 0 expression', () => { const { props } =
{void 0}
; // eslint-disable-line no-void expect(childrenExist(props.children)).toBe(false); }); test('returns false for NaN expression', () => { const { props } =
{NaN}
; expect(childrenExist(props.children)).toBe(false); }); test('returns false for undefined expression', () => { const { props } =
{undefined}
; expect(childrenExist(props.children)).toBe(false); }); });