vega-frontend-monorepo/libs/positions/src/lib/positions-table.spec.tsx
2022-03-29 18:57:13 +02:00

23 lines
621 B
TypeScript

import { render } from '@testing-library/react';
import { act } from 'react-dom/test-utils';
import { MockedProvider } from '@apollo/react-testing';
import PositionsTable from './positions-table';
describe('PositionsTable', () => {
it('should render successfully', async () => {
await act(async () => {
const { baseElement } = render(
<MockedProvider>
<PositionsTable
data={[]}
onRowClicked={(marketId) => {
console.log(marketId);
}}
/>
</MockedProvider>
);
expect(baseElement).toBeTruthy();
});
});
});