You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
681 B
28 lines
681 B
/* 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',
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|