1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-03 14:44:27 +01:00
metamask-extension/ui/components/app/signature-request/signature-request-header/signature-request-header.component.test.js

24 lines
844 B
JavaScript
Raw Normal View History

import React from 'react';
import configureMockStore from 'redux-mock-store';
import mockState from '../../../../../test/data/mock-state.json';
import { renderWithProvider } from '../../../../../test/lib/render-helpers';
import SignatureRequestHeader from './signature-request-header.component';
describe('SignatureRequestHeader', () => {
const store = configureMockStore()(mockState);
it('renders correctly with fromAccount', () => {
const fromAccount = { address: '0x' };
const { container } = renderWithProvider(
<SignatureRequestHeader fromAccount={fromAccount} />,
store,
);
expect(container).toMatchSnapshot();
});
it('renders correctly without fromAccount', () => {
const { container } = renderWithProvider(<SignatureRequestHeader />, store);
expect(container).toMatchSnapshot();
});
});