aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/tests/currency-display.container.test.js
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-10-21 13:59:53 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-10-21 13:59:53 +0800
commit9c1b2108f69334884473eb95758e2d1c02c984d6 (patch)
tree93f5255399307a28cb9380dc23c275b406403929 /ui/app/components/currency-display/tests/currency-display.container.test.js
parent13820b6cc1801a420f39cdfecd7ccb5309dc597b (diff)
parentb0c649a4e3c68293e08e764bbf4d53939df88e2d (diff)
downloadtangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar.gz
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar.bz2
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar.lz
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar.xz
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.tar.zst
tangerine-wallet-browser-9c1b2108f69334884473eb95758e2d1c02c984d6.zip
fix merge conflicts
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)
})
})
})