mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
add test for pendingTxCount
This commit is contained in:
parent
9e0c0745ab
commit
59909601b8
@ -59,6 +59,19 @@ describe('Transaction Controller', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('#getPendingTxCount', function () {
|
||||
it('should return the number of pending txs', function () {
|
||||
txController.txStateManager._saveTxList([
|
||||
{ id: 1, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} },
|
||||
{ id: 2, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} },
|
||||
{ id: 3, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} },
|
||||
])
|
||||
const pendingTxCount = txController.getPendingTxCount()
|
||||
assert.equal(pendingTxCount, 3, 'should be 3')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
describe('#newUnapprovedTransaction', function () {
|
||||
let stub, txMeta, txParams
|
||||
beforeEach(function () {
|
||||
|
Loading…
Reference in New Issue
Block a user