2018-08-31 21:34:22 +02:00
|
|
|
import assert from 'assert'
|
|
|
|
import proxyquire from 'proxyquire'
|
|
|
|
|
|
|
|
let mapStateToProps
|
|
|
|
|
|
|
|
proxyquire('../transaction-activity-log.container.js', {
|
|
|
|
'react-redux': {
|
|
|
|
connect: ms => {
|
|
|
|
mapStateToProps = ms
|
|
|
|
return () => ({})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
describe('TransactionActivityLog container', () => {
|
|
|
|
describe('mapStateToProps()', () => {
|
|
|
|
it('should return the correct props', () => {
|
|
|
|
const mockState = {
|
|
|
|
metamask: {
|
|
|
|
conversionRate: 280.45,
|
2018-10-26 10:26:43 +02:00
|
|
|
nativeCurrency: 'ETH',
|
2018-08-31 21:34:22 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2018-10-26 10:26:43 +02:00
|
|
|
assert.deepEqual(mapStateToProps(mockState), { conversionRate: 280.45, nativeCurrency: 'ETH' })
|
2018-08-31 21:34:22 +02:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|