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.
29 lines
680 B
29 lines
680 B
4 years ago
|
/* eslint-disable import/unambiguous */
|
||
4 years ago
|
let mapStateToProps;
|
||
7 years ago
|
|
||
4 years ago
|
jest.mock('react-redux', () => ({
|
||
|
connect: (ms) => {
|
||
|
mapStateToProps = ms;
|
||
|
return () => ({});
|
||
7 years ago
|
},
|
||
4 years ago
|
}));
|
||
|
|
||
|
jest.mock('../../../../../selectors', () => ({
|
||
|
getSendErrors: (s) => `mockErrors:${s}`,
|
||
|
}));
|
||
|
|
||
|
require('./send-row-error-message.container.js');
|
||
7 years ago
|
|
||
4 years ago
|
describe('send-row-error-message container', () => {
|
||
|
describe('mapStateToProps()', () => {
|
||
|
it('should map the correct properties to props', () => {
|
||
|
expect(
|
||
4 years ago
|
mapStateToProps('mockState', { errorType: 'someType' }),
|
||
4 years ago
|
).toStrictEqual({
|
||
|
errors: 'mockErrors:mockState',
|
||
|
errorType: 'someType',
|
||
|
});
|
||
4 years ago
|
});
|
||
|
});
|
||
|
});
|