1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

fix unit tests

This commit is contained in:
brunobar79 2018-07-02 21:03:34 -04:00
parent c734e486a0
commit 4b398701c1

View File

@ -57,12 +57,11 @@ describe('TransactionStateManager', function () {
const tx = { id: 1, status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} }
txStateManager.addTx(tx)
const noop = function (err, txId) {
if (!err) {
if (err) {
console.log('Error: ', err)
}
assert(true, 'event listener has been triggered and noop executed')
done()
} else {
done(new Error(err.toString()))
}
}
txStateManager.on('1:rejected', noop)
txStateManager.setTxStatusRejected(1)