1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 23:14:56 +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
678 B
JavaScript
Raw Normal View History

/* eslint-disable import/unambiguous */
let mapStateToProps;
jest.mock('react-redux', () => ({
connect: (ms) => {
mapStateToProps = ms;
return () => ({});
},
}));
jest.mock('../../../../../ducks/send', () => ({
getSendErrors: (s) => `mockErrors:${s}`,
}));
require('./send-row-error-message.container');
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',
});
});
});
});