import React from 'react'
import { render, screen } from '@testing-library/react'
import App from './App'
import { setupMediaDevicesMock } from '../../testUtils'

test('renders the example application', async () => {
  setupMediaDevicesMock()
  render(<App />)
  expect(await screen.findByRole('button', { name: 'Audio devices' })).toBeInTheDocument()
  const exampleText = screen.getByText('Example')
  expect(exampleText).toBeInTheDocument()
})
