mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 14:15:06 +01:00
057188d155
* Started adding code fences in signature-request * Finished code fencing * Improving code * Fixed storybook and code fences bundle * Added missing dependency * Fixed yarn.lock * Fixing policies * Updated package.json * updating lavamoat * lavamoat fix * adds missing package * runs yarn dedupe * updates method name * run lavamoat:auto again * Added more code fences * updates snapshot * snapshot updates * updates mmi packages to lighter versions * updates mmi packages * runs lavamoat auto * updates yarn lock and runs lavamoat auto * updates yarn lock * updates targets file * Removed console log and added tests --------- Co-authored-by: António Regadas <apregadas@gmail.com> Co-authored-by: Brad Decker <bhdecker84@gmail.com> Co-authored-by: Antonio Regadas <antonio.regadas@consensys.net>
24 lines
844 B
JavaScript
24 lines
844 B
JavaScript
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();
|
|
});
|
|
});
|