git.delta.rocks / unique-network / refs/commits / e43feaa8dd78

difftreelog

Fix flaky test

Max Andreev2023-02-16parent: #58ad49b.patch.diff
in: master

1 file changed

modifiedtests/src/sub/appPromotion/appPromotion.test.tsdiffbeforeafterboth
867 await helper.staking.stake(staker, 100n * nominal);867 await helper.staking.stake(staker, 100n * nominal);
868 await helper.staking.unstakePartial(staker, 100n * nominal - 1n);868 await helper.staking.unstakePartial(staker, 100n * nominal - 1n);
869869
870 const [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address});870 const [_stake1, stake2] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address});
871 await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake.block));871 await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake2.block));
872872
873 const stakerPayout = await payUntilRewardFor(staker.address, helper);873 const stakerPayout = await payUntilRewardFor(staker.address, helper);
874 expect(stakerPayout.stake).to.eq(100n * nominal + 1n);874 expect(stakerPayout.stake).to.eq(100n * nominal + 1n);