1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00

Make test Async

This commit is contained in:
Thomas Huang 2017-06-12 17:42:54 -07:00
parent bbe0c73dca
commit dbc48c3992

View File

@ -311,12 +311,13 @@ describe('Transaction Controller', function () {
})
describe('#sign replay-protected tx', function () {
it('prepares a tx with the chainId set', function () {
it('prepares a tx with the chainId set', function (done) {
txController.addTx({ id: '1', status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} }, noop)
txController.signTransaction('1', (err, rawTx) => {
if (err) return assert.fail('it should not fail')
const ethTx = new EthTx(ethUtil.toBuffer(rawTx))
assert.equal(ethTx.getChainId(), currentNetworkId)
done()
})
})
})