2022-02-11 13:56:28 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { render } from '@testing-library/react';
|
|
|
|
|
2022-03-01 00:59:18 +00:00
|
|
|
import Index from '../pages/index.page';
|
2022-02-28 22:29:05 +00:00
|
|
|
import { VegaWalletContext } from '@vegaprotocol/react-helpers';
|
2022-02-11 13:56:28 +00:00
|
|
|
|
|
|
|
describe('Index', () => {
|
|
|
|
it('should render successfully', () => {
|
2022-02-28 22:29:05 +00:00
|
|
|
const { baseElement } = render(
|
|
|
|
<VegaWalletContext.Provider
|
|
|
|
value={{
|
|
|
|
keypair: null,
|
|
|
|
keypairs: null,
|
|
|
|
connect: jest.fn(),
|
|
|
|
disconnect: jest.fn(),
|
|
|
|
selectPublicKey: jest.fn(),
|
|
|
|
connector: null,
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Index />
|
|
|
|
</VegaWalletContext.Provider>
|
|
|
|
);
|
2022-02-11 13:56:28 +00:00
|
|
|
expect(baseElement).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|