1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-28 23:06:37 +01:00
metamask-extension/ui/pages/send/send-content/send-row-wrapper/send-row-error-message/send-row-error-message.container.test.js

29 lines
680 B
JavaScript
Raw Normal View History

/* eslint-disable import/unambiguous */
let mapStateToProps;
jest.mock('react-redux', () => ({
connect: (ms) => {
mapStateToProps = ms;
return () => ({});
},
}));
jest.mock('../../../../../selectors', () => ({
getSendErrors: (s) => `mockErrors:${s}`,
}));
require('./send-row-error-message.container.js');
describe('send-row-error-message container', () => {
describe('mapStateToProps()', () => {
it('should map the correct properties to props', () => {
expect(
2020-11-03 00:41:28 +01:00
mapStateToProps('mockState', { errorType: 'someType' }),
).toStrictEqual({
errors: 'mockErrors:mockState',
errorType: 'someType',
});
});
});
});