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.
30 lines
680 B
30 lines
680 B
4 years ago
|
/* eslint-disable import/unambiguous */
|
||
4 years ago
|
let mapStateToProps;
|
||
6 years ago
|
|
||
4 years ago
|
jest.mock('react-redux', () => ({
|
||
|
connect: (ms) => {
|
||
|
mapStateToProps = ms;
|
||
|
return () => ({});
|
||
6 years ago
|
},
|
||
4 years ago
|
}));
|
||
|
|
||
|
require('./user-preferenced-currency-input.container.js');
|
||
6 years ago
|
|
||
4 years ago
|
describe('UserPreferencedCurrencyInput container', () => {
|
||
|
describe('mapStateToProps()', () => {
|
||
|
it('should return the correct props', () => {
|
||
6 years ago
|
const mockState = {
|
||
|
metamask: {
|
||
|
preferences: {
|
||
6 years ago
|
useNativeCurrencyAsPrimaryCurrency: true,
|
||
6 years ago
|
},
|
||
|
},
|
||
4 years ago
|
};
|
||
6 years ago
|
|
||
4 years ago
|
expect(mapStateToProps(mockState)).toStrictEqual({
|
||
6 years ago
|
useNativeCurrencyAsPrimaryCurrency: true,
|
||
4 years ago
|
});
|
||
|
});
|
||
|
});
|
||
|
});
|