import React from 'react'; import { TransactionType } from '../../../../shared/constants/transaction'; import mockState from '../../../../test/data/mock-state.json'; import { renderWithProvider } from '../../../../test/lib/render-helpers'; import configureStore from '../../../store/store'; import ConfirmTitle from './confirm-title'; describe('ConfirmTitle', () => { const store = configureStore(mockState); it('should render title correctly', async () => { const { findByText } = renderWithProvider( , store, ); expect(await findByText('0.00001')).toBeInTheDocument(); }); it('should return null if transaction is contract interation with 0 value', () => { const { container } = renderWithProvider( , store, ); expect(container.firstChild).toStrictEqual(null); }); it('should render title if passed', () => { const { getByText } = renderWithProvider( , store, ); expect(getByText('dummy_title_passed')).toBeInTheDocument(); }); });