1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/ui/components/app/confirm-page-container/confirm-detail-row/confirm-detail-row.component.test.js

37 lines
978 B
JavaScript

import React from 'react';
import configureMockStore from 'redux-mock-store';
import { NetworkStatus } from '@metamask/network-controller';
import { NetworkType } from '@metamask/controller-utils';
import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import ConfirmDetailRow from '.';
describe('Confirm Detail Row Component', () => {
const mockState = {
metamask: {
providerConfig: {
type: 'rpc',
chainId: '0x5',
},
preferences: {
useNativeCurrencyAsPrimaryCurrency: true,
},
selectedNetworkClientId: NetworkType.mainnet,
networksMetadata: {
[NetworkType.mainnet]: {
EIPS: {},
status: NetworkStatus.Available,
},
},
},
};
const store = configureMockStore()(mockState);
it('should match snapshot', () => {
const { container } = renderWithProvider(<ConfirmDetailRow />, store);
expect(container).toMatchSnapshot();
});
});