import Theme from 'features/theme/ThemeProvider';
import React from 'react';
import { Provider } from 'react-redux';

import { StylesProvider } from '@material-ui/core/styles';
import { render } from '@testing-library/react';

import App from './App';
import store from './store';

test('renders learn react link', () => {
  const { getByText } = render(
    <Provider store={store}>
      <StylesProvider injectFirst>
        <Theme>
          <App />
        </Theme>
      </StylesProvider>
    </Provider>,
  );
  const linkElement = getByText(/learn react/i);
  expect(linkElement).toBeInTheDocument();
});
