difftreelog
fix tests
in: master
3 files changed
tests/src/confirmSponsorship.test.tsdiffbeforeafterboth--- a/tests/src/confirmSponsorship.test.ts
+++ b/tests/src/confirmSponsorship.test.ts
@@ -21,6 +21,7 @@
normalizeAccountId,
addCollectionAdminExpectSuccess,
getCreatedCollectionCount,
+ UNIQUE,
} from './util/helpers';
import {Keyring} from '@polkadot/api';
import {IKeyringPair} from '@polkadot/types/types';
@@ -198,7 +199,7 @@
const sponsorBalanceAfter = (await api.query.system.account(bob.address)).data.free.toBigInt();
// Try again after Zero gets some balance - now it should succeed
- const balancetx = api.tx.balances.transfer(zeroBalance.address, 1e15);
+ const balancetx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
await submitTransactionAsync(alice, balancetx);
const events2 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result2 = getGenericResult(events2);
@@ -232,7 +233,7 @@
const sponsorBalanceAfter = (await api.query.system.account(bob.address)).data.free.toBigInt();
// Try again after Zero gets some balance - now it should succeed
- const balancetx = api.tx.balances.transfer(zeroBalance.address, 1e15);
+ const balancetx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
await submitTransactionAsync(alice, balancetx);
const events2 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result2 = getGenericResult(events2);
@@ -268,7 +269,7 @@
expect(sponsorBalanceAfter).to.be.equal(sponsorBalanceBefore);
// Try again after Zero gets some balance - now it should succeed
- const balancetx = api.tx.balances.transfer(zeroBalance.address, 1e15);
+ const balancetx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
await submitTransactionAsync(alice, balancetx);
const events2 = await submitTransactionAsync(zeroBalance, zeroToAlice);
const result2 = getGenericResult(events2);
@@ -307,7 +308,7 @@
const sponsorBalanceAfter = (await api.query.system.account(bob.address)).data.free.toBigInt();
// Try again after Zero gets some balance - now it should succeed
- const balancetx = api.tx.balances.transfer(zeroBalance.address, 1e15);
+ const balancetx = api.tx.balances.transfer(zeroBalance.address, 1n * UNIQUE);
await submitTransactionAsync(alice, balancetx);
await createItemExpectSuccess(zeroBalance, collectionId, 'NFT', zeroBalance.address);
tests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -154,8 +154,8 @@
const aliceBalanceAfter: bigint = (await api.query.system.account(alicesPublicKey)).data.free.toBigInt();
const fee = aliceBalanceBefore - aliceBalanceAfter;
- expect(fee / 10n ** 15n < BigInt(Math.ceil(saneMaximumFee + createCollectionDeposit))).to.be.true;
- expect(fee / 10n ** 15n < BigInt(Math.ceil(saneMinimumFee + createCollectionDeposit))).to.be.true;
+ expect(fee / UNIQUE < BigInt(Math.ceil(saneMaximumFee + createCollectionDeposit))).to.be.true;
+ expect(fee / UNIQUE < BigInt(Math.ceil(saneMinimumFee + createCollectionDeposit))).to.be.true;
});
});
tests/src/eth/payable.test.tsdiffbeforeafterboth54 expect(await contract.methods.getUnaccounted().call()).to.be.equal('10000');54 expect(await contract.methods.getUnaccounted().call()).to.be.equal('10000');55 });55 });565657 itWeb3('Balance can be retrieved from evm contract', async({api, web3}) => {57 itWeb3.only('Balance can be retrieved from evm contract', async({api, web3}) => {58 const FEE_BALANCE = 10n ** 18n;58 const FEE_BALANCE = 10n ** 18n;59 const CONTRACT_BALANCE = 10n ** 14n;59 const CONTRACT_BALANCE = 10n ** 14n;6060