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
2021-06-23 16:35:25 -05:00

29 lines
681 B
JavaScript

/* 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.js');
describe('send-row-error-message container', () => {
describe('mapStateToProps()', () => {
it('should map the correct properties to props', () => {
expect(
mapStateToProps('mockState', { errorType: 'someType' }),
).toStrictEqual({
errors: 'mockErrors:mockState',
errorType: 'someType',
});
});
});
});