Fix RTL warnings

This commit is contained in:
Bartłomiej Głownia 2022-03-21 19:22:53 +01:00
parent 81763c1e70
commit 8b57f6fdb1

View File

@ -1,9 +1,11 @@
import { render } from '@testing-library/react'; import { render } from '@testing-library/react';
import { act } from 'react-dom/test-utils';
import { MockedProvider } from '@apollo/react-testing'; import { MockedProvider } from '@apollo/react-testing';
import MarketListTable from './market-list-table'; import MarketListTable from './market-list-table';
describe('MarketListTable', () => { describe('MarketListTable', () => {
it('should render successfully', () => { it('should render successfully', async () => {
await act(async () => {
const { baseElement } = render( const { baseElement } = render(
<MockedProvider> <MockedProvider>
<MarketListTable /> <MarketListTable />
@ -11,4 +13,5 @@ describe('MarketListTable', () => {
); );
expect(baseElement).toBeTruthy(); expect(baseElement).toBeTruthy();
}); });
});
}); });