1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/pages/send/send-content/send-row-wrapper/send-row-warning-message/tests/send-row-warning-message-container.test.js
Whymarrh Whitby 094e4cf555 Check for unused function arguments (#6583)
* 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
2019-05-08 15:51:33 -04:00

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' })
})
})
})