1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 14:15:06 +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-06 12:45:27 -02:30

29 lines
680 B
JavaScript

/* 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(
mapStateToProps('mockState', { errorType: 'someType' }),
).toStrictEqual({
errors: 'mockErrors:mockState',
errorType: 'someType',
});
});
});
});