import React, { Fragment } from 'react'; import { unwrapRootFragment } from './unwrapRootFragment'; describe('packages/lib/unwrapRootFragment', () => { test('returns a single child that is not a Fragment', () => { const unwrapped = unwrapRootFragment(
); expect(unwrapped).toHaveLength(1); }); test('returns children unchanged when it is an array', () => { const unwrapped = unwrapRootFragment([ , , ]); expect(unwrapped).toHaveLength(2); }); test("returns a single Fragment's children", () => { const unwrapped = unwrapRootFragment(