1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-24 20:32:02 +02:00
metamask-extension/ui/app/components/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js
2019-01-23 14:39:56 -03:30

29 lines
672 B
JavaScript

import assert from 'assert'
import proxyquire from 'proxyquire'
let mapStateToProps
proxyquire('../send-row-warning-message.container.js', {
'react-redux': {
connect: (ms, md) => {
mapStateToProps = ms
return () => ({})
},
},
'../../../send.selectors': { getSendWarnings: (s) => `mockWarnings:${s}` },
})
describe('send-row-warning-message container', () => {
describe('mapStateToProps()', () => {
it('should map the correct properties to props', () => {
assert.deepEqual(mapStateToProps('mockState', { warningType: 'someType' }), {
warnings: 'mockWarnings:mockState',
warningType: 'someType' })
})
})
})