Skip to content

Commit

Permalink
fix fetchScheduledRewards() test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Jan 17, 2024
1 parent 605512d commit 5e55b90
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions main/test/wallet-backend.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,18 @@ describe('Wallet Backend', function () {
})

describe('fetchScheduledRewards()', function () {
it('fetches rewards scheduled for disbursement', async function () {
// We need a new wallet that doesn't have any scheduled rewards
await backend.setup(randomSeed())
const amount = await pRetry(
() => backend.fetchScheduledRewards(),
{ retries: 10 }
)
assert.strictEqual(amount.toBigInt(), 0n)
})
it(
'fetches rewards scheduled for disbursement',
/** @this {Mocha.Test} */ async function () {
this.timeout(20_000)
// We need a new wallet that doesn't have any scheduled rewards
await backend.setup(randomSeed())
const amount = await pRetry(
() => backend.fetchScheduledRewards(),
{ retries: 10 }
)
assert.strictEqual(amount.toBigInt(), 0n)
}
)
})
})

0 comments on commit 5e55b90

Please sign in to comment.