You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
803 B
27 lines
803 B
import React from 'react';
|
|
|
|
import { renderWithProvider } from '../../../../test/jest';
|
|
import ImportToken from '.';
|
|
|
|
const createProps = (customProps = {}) => {
|
|
return {
|
|
onImportTokenCloseClick: jest.fn(),
|
|
onImportTokenClick: jest.fn(),
|
|
setIsImportTokenModalOpen: jest.fn(),
|
|
tokenForImport: {
|
|
symbol: 'POS',
|
|
name: 'PoSToken',
|
|
address: '0xee609fe292128cad03b786dbb9bc2634ccdbe7fc',
|
|
},
|
|
...customProps,
|
|
};
|
|
};
|
|
|
|
describe('ImportToken', () => {
|
|
it('renders the component with initial props', () => {
|
|
const props = createProps();
|
|
const { getByText } = renderWithProvider(<ImportToken {...props} />);
|
|
expect(getByText(props.tokenForImport.name)).toBeInTheDocument();
|
|
expect(getByText(props.tokenForImport.address)).toBeInTheDocument();
|
|
});
|
|
});
|
|
|