aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-06-16 06:25:22 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-06-16 06:25:22 +0800
commitb67bc7043ee231bb9ed4781aa4ac29d4e3107481 (patch)
tree867be0b213a8479047c8098e29d97d160704cf3d /test/unit
parentb3492d9c17e62332c17bb082c23db30512e2b881 (diff)
downloadtangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar.gz
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar.bz2
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar.lz
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar.xz
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.tar.zst
tangerine-wallet-browser-b67bc7043ee231bb9ed4781aa4ac29d4e3107481.zip
Fix test to call done
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/tx-controller-test.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 7c8d1761d..908b060d4 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -270,26 +270,28 @@ describe('Transaction Controller', function () {
it('does not overwrite set values', function (done) {
+ this.timeout(15000)
const wrongValue = '0x05'
txController.addTx(txMeta)
const estimateStub = sinon.stub(txController.txProviderUtils.query, 'estimateGas')
- .callsArgWith(1, null, wrongValue)
+ .callsArgWithAsync(1, null, wrongValue)
const priceStub = sinon.stub(txController.txProviderUtils.query, 'gasPrice')
- .callsArgWith(0, null, wrongValue)
+ .callsArgWithAsync(0, null, wrongValue)
const nonceStub = sinon.stub(txController.txProviderUtils.query, 'getTransactionCount')
- .callsArgWith(2, null, wrongValue)
+ .callsArgWithAsync(2, null, wrongValue)
const signStub = sinon.stub(txController, 'signTransaction')
- .callsArgWith(1, null, noop)
+ .callsArgWithAsync(1, null, noop)
const pubStub = sinon.stub(txController.txProviderUtils, 'publishTransaction')
- .callsArgWith(1, null, originalValue)
+ .callsArgWithAsync(1, null, originalValue)
+ console.log('HERE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
- txController.approveTransaction(txMeta.id, (err) => {
+ txController.approveTransaction(txMeta.id).then((err) => {
assert.ifError(err, 'should not error')
const result = txController.getTx(txMeta.id)
@@ -305,7 +307,6 @@ describe('Transaction Controller', function () {
signStub.restore()
nonceStub.restore()
pubStub.restore()
-
done()
})
})