import React from 'react'
import { render } from '@testing-library/react'
import { IntlProvider } from 'react-intl'
import ProductSwitcherList from './List'
import ProductSwitcherListItem from './ListItem'

describe('ProductSwitcherList', () => {
    it('Render one child', () => {
        const { getByRole } = render(
            <IntlProvider locale="en">
                <ProductSwitcherList onClose={() => {}} onKeyDown={() => {}}>
                    <ProductSwitcherListItem label="Hello" app="leankit" />
                </ProductSwitcherList>
            </IntlProvider>
        )

        expect(getByRole('menuitemradio')).toBeInTheDocument()
    })
})
