mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
tx cont - fix test to use async api
This commit is contained in:
parent
4445ba1569
commit
5ec73c0e65
@ -343,13 +343,17 @@ describe('Transaction Controller', function () {
|
|||||||
// Adding the fake tx:
|
// Adding the fake tx:
|
||||||
txController.addTx(clone(txMeta))
|
txController.addTx(clone(txMeta))
|
||||||
|
|
||||||
txController._resubmitTx(txMeta, function (err) {
|
txController._resubmitTx(txMeta)
|
||||||
assert.ifError(err, 'should not throw an error')
|
.then(() => {
|
||||||
const updatedMeta = txController.getTx(txMeta.id)
|
const updatedMeta = txController.getTx(txMeta.id)
|
||||||
assert.notEqual(updatedMeta.status, txMeta.status, 'status changed.')
|
assert.notEqual(updatedMeta.status, txMeta.status, 'status changed.')
|
||||||
assert.equal(updatedMeta.status, 'failed', 'tx set to failed.')
|
assert.equal(updatedMeta.status, 'failed', 'tx set to failed.')
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
assert.ifError(err, 'should not throw an error')
|
||||||
|
done()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user