aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-18 11:05:02 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-20 05:31:10 +0800
commit6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e (patch)
treed2b6276feb59d22ee08252801db2b051435d3c48 /ui
parent27799363177bd1c5bc390d5903c1915d77bf82aa (diff)
downloadtangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar.gz
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar.bz2
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar.lz
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar.xz
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.tar.zst
tangerine-wallet-browser-6b3a4e8259dbf45b207f57e8619c4aaa5bd1c35e.zip
Fix unit tests
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/transaction-action/tests/transaction-action.component.test.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/app/components/transaction-action/tests/transaction-action.component.test.js b/ui/app/components/transaction-action/tests/transaction-action.component.test.js
index 218792847..9352c7b43 100644
--- a/ui/app/components/transaction-action/tests/transaction-action.component.test.js
+++ b/ui/app/components/transaction-action/tests/transaction-action.component.test.js
@@ -5,10 +5,9 @@ import sinon from 'sinon'
import TransactionAction from '../transaction-action.component'
describe('TransactionAction Component', () => {
- const tOrDefault = key => key
+ const t = key => key
global.eth = {
getCode: sinon.stub().callsFake(address => {
- console.log('CALLED')
const code = address === 'approveAddress' ? 'contract' : '0x'
return Promise.resolve(code)
}),
@@ -36,7 +35,7 @@ describe('TransactionAction Component', () => {
methodData={methodData}
transaction={transaction}
className="transaction-action"
- />, { context: { tOrDefault }})
+ />, { context: { t }})
assert.equal(wrapper.find('.transaction-action').length, 1)
assert.equal(wrapper.text(), '--')
@@ -63,7 +62,7 @@ describe('TransactionAction Component', () => {
methodData={methodData}
transaction={transaction}
className="transaction-action"
- />, { context: { tOrDefault }})
+ />, { context: { t }})
assert.equal(wrapper.find('.transaction-action').length, 1)
wrapper.setState({ transactionAction: 'sentEther' })
@@ -102,7 +101,7 @@ describe('TransactionAction Component', () => {
methodData={methodData}
transaction={transaction}
className="transaction-action"
- />, { context: { tOrDefault }})
+ />, { context: { t }})
assert.equal(wrapper.find('.transaction-action').length, 1)
wrapper.setState({ transactionAction: 'approve' })