mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
094e4cf555
* eslint: Check for unused function arguments * eslint: Ignore unused '_' in argument list Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly * Remove and rename unused arguments
29 lines
668 B
JavaScript
29 lines
668 B
JavaScript
import assert from 'assert'
|
|
import proxyquire from 'proxyquire'
|
|
|
|
let mapStateToProps
|
|
|
|
proxyquire('../send-row-warning-message.container.js', {
|
|
'react-redux': {
|
|
connect: (ms) => {
|
|
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' })
|
|
})
|
|
|
|
})
|
|
|
|
})
|