aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/tests/currency-display.container.test.js
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2018-10-18 08:30:07 +0800
committerGitHub <noreply@github.com>2018-10-18 08:30:07 +0800
commitc2f97717c0fbf9a64cf527891f7a1f35049fb023 (patch)
treef62dabf7a62798ad82641305422fb4e0bcc0a74a /ui/app/components/currency-display/tests/currency-display.container.test.js
parent85884b21afe6e5e85b58123b24e72776d1437cc6 (diff)
parent17372e150d7070e9f4870e65a7d6c1d88568f2f5 (diff)
downloadtangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.tar.gz
tangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.tar.zst
tangerine-wallet-browser-c2f97717c0fbf9a64cf527891f7a1f35049fb023.zip
Merge pull request #5539 from MetaMask/v4.16.0
Version 4.16.0
Diffstat (limited to 'ui/app/components/currency-display/tests/currency-display.container.test.js')
-rw-r--r--ui/app/components/currency-display/tests/currency-display.container.test.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/ui/app/components/currency-display/tests/currency-display.container.test.js b/ui/app/components/currency-display/tests/currency-display.container.test.js
index 5265bbb04..b9f98c543 100644
--- a/ui/app/components/currency-display/tests/currency-display.container.test.js
+++ b/ui/app/components/currency-display/tests/currency-display.container.test.js
@@ -1,12 +1,13 @@
import assert from 'assert'
import proxyquire from 'proxyquire'
-let mapStateToProps
+let mapStateToProps, mergeProps
proxyquire('../currency-display.container.js', {
'react-redux': {
- connect: ms => {
+ connect: (ms, md, mp) => {
mapStateToProps = ms
+ mergeProps = mp
return () => ({})
},
},
@@ -22,6 +23,20 @@ describe('CurrencyDisplay container', () => {
},
}
+ assert.deepEqual(mapStateToProps(mockState), {
+ conversionRate: 280.45,
+ currentCurrency: 'usd',
+ })
+ })
+ })
+
+ describe('mergeProps()', () => {
+ it('should return the correct props', () => {
+ const mockStateProps = {
+ conversionRate: 280.45,
+ currentCurrency: 'usd',
+ }
+
const tests = [
{
props: {
@@ -98,7 +113,7 @@ describe('CurrencyDisplay container', () => {
]
tests.forEach(({ props, result }) => {
- assert.deepEqual(mapStateToProps(mockState, props), result)
+ assert.deepEqual(mergeProps(mockStateProps, {}, { ...props }), result)
})
})
})