1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-13 21:27:12 +01:00
metamask-extension/ui/app/components/user-preferenced-token-input/tests/user-preferenced-token-input.container.test.js

32 lines
685 B
JavaScript

import assert from 'assert'
import proxyquire from 'proxyquire'
let mapStateToProps
proxyquire('../user-preferenced-token-input.container.js', {
'react-redux': {
connect: ms => {
mapStateToProps = ms
return () => ({})
},
},
})
describe('UserPreferencedTokenInput container', () => {
describe('mapStateToProps()', () => {
it('should return the correct props', () => {
const mockState = {
metamask: {
preferences: {
useNativeCurrencyAsPrimaryCurrency: true,
},
},
}
assert.deepEqual(mapStateToProps(mockState), {
useNativeCurrencyAsPrimaryCurrency: true,
})
})
})
})