Skip to content

Commit

Permalink
Remove waitForExpect
Browse files Browse the repository at this point in the history
  • Loading branch information
helloscoopa committed Jan 5, 2023
1 parent 8eb155b commit fe75304
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,16 @@ describe('Account', () => {
it('should get accountHistoryCount for multiple txtypes at once', async () => {
const mintCount = await client.account.historyCount('mine', { txtype: DfTxType.MINT_TOKEN })
const poolSwapCount = await client.account.historyCount('mine', { txtype: DfTxType.POOL_SWAP })
const combinedCount = await client.account.historyCount('mine', { txtypes: [DfTxType.MINT_TOKEN, DfTxType.POOL_SWAP] })

await waitForExpect(async () => {
const combinedCount = await client.account.historyCount('mine', { txtypes: [DfTxType.MINT_TOKEN, DfTxType.POOL_SWAP] })
expect(combinedCount).toStrictEqual(mintCount + poolSwapCount)
})
expect(combinedCount).toStrictEqual(mintCount + poolSwapCount)
})

it('should get accountHistoryCount for multiple addresses at once', async () => {
const fromCount = await client.account.historyCount(from)
const toCount = await client.account.historyCount(to)
const combinedCount = await client.account.historyCount([from, to])

await waitForExpect(async () => {
const combinedCount = await client.account.historyCount([from, to])
expect(combinedCount).toStrictEqual(fromCount + toCount)
})
expect(combinedCount).toStrictEqual(fromCount + toCount)
})
})

0 comments on commit fe75304

Please sign in to comment.