// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import '@testing-library/jest-dom'; import React from 'react'; import Grid from '../../../../src/components/ui/Grid'; import Cell from '../../../../src/components/ui/Grid/Cell'; import lightTheme from '../../../../src/theme/light'; import { renderWithTheme } from '../../../test-helpers'; const CHILD = 'Child'; const Child = () =>

{CHILD}

; describe('Grid', () => { it('should render a Grid without specified props', () => { const component = ( ); const { getByText } = renderWithTheme(lightTheme, component); const element = getByText(CHILD); expect(element).toBeInTheDocument(); }); it('should render a Grid with specified props', () => { const component = ( ); const { getAllByText, container } = renderWithTheme(lightTheme, component); const result = getAllByText(/Child/); expect(result).toHaveLength(2); }); it('should render a Grid with custom