From b67bc7043ee231bb9ed4781aa4ac29d4e3107481 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Thu, 15 Jun 2017 15:25:22 -0700 Subject: Fix test to call done --- test/unit/tx-controller-test.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test/unit') 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() }) }) -- cgit v1.2.3