UNPKG

@navinc/base-react-components

Version:
19 lines (17 loc) 526 B
import { screen, render } from '@testing-library/react' import Text from './text.js' import TabGroup from './tab-group.js' describe('TabGroup', () => { it('renders the tab group', () => { render(<TabGroup />) expect(screen.getByTestId('tab-group')) }) it('renders a tab for each child element', () => { render( <TabGroup> {[<Text key="first">first</Text>, <Text key="second">second</Text>, <Text key="third">third</Text>]} </TabGroup> ) expect(screen.getByText('third')) }) })