Skip to content

Commit

Permalink
fix(platform-test-suite): big int please
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Feb 5, 2025
1 parent 4999e1a commit 512eebf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/platform-test-suite/test/e2e/withdrawals.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('Withdrawals', function withdrawalsTest() {

// Should ensure balances are right
expect(walletBalanceUpdated).to.be.greaterThan(walletBalanceBefore);
expect(identityBalanceUpdated).to.be.lessThan(identityBalanceBefore);
expect(identityBalanceUpdated < identityBalanceBefore).to.be.true();

// Should allow deleting of the withdrawal document
await client.platform.documents.broadcast({
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('Withdrawals', function withdrawalsTest() {
const account = await client.getWalletAccount();
const identityBalanceBefore = identity.getBalance();
const withdrawTo = await account.getUnusedAddress();
const amountToWithdraw = identityBalanceBefore * 2;
const amountToWithdraw = identityBalanceBefore * BigInt(2);

await expect(client.platform.identities.withdrawCredits(
identity,
Expand All @@ -187,7 +187,7 @@ describe('Withdrawals', function withdrawalsTest() {
const account = await client.getWalletAccount();
const identityBalanceBefore = identity.getBalance();
const withdrawTo = await account.getUnusedAddress();
const amountToWithdraw = identityBalanceBefore / 2;
const amountToWithdraw = identityBalanceBefore / BigInt(2);

await expect(client.platform.identities.withdrawCredits(
identity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe('Platform', () => {

documentsBatchTransition.transitions[0].data.firstName = 'nameToProve';
documentsBatchTransition.transitions[0].updatedAt = new Date();
documentsBatchTransition.transitions[0].revision += 1;
documentsBatchTransition.transitions[0].revision += BigInt(1);
const signedTransition = await signStateTransition(
client.platform,
documentsBatchTransition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ describe('Platform', () => {
identity.getId(),
);

expect(identity.getRevision()).to.equal(identityBeforeUpdate.revision + 1);
expect(identity.getRevision()).to.equal(BigInt(identityBeforeUpdate.revision) + BigInt(1));
expect(identity.getPublicKeyById(2)).to.exist();

const newPublicKeyObject = newPublicKey.toObject(true);
Expand Down Expand Up @@ -651,7 +651,7 @@ describe('Platform', () => {
identity.getId(),
);

expect(identity.getRevision()).to.equal(identityBeforeUpdate.revision + 1);
expect(identity.getRevision()).to.equal(BigInt(identityBeforeUpdate.revision) + BigInt(1));
expect(identity.getPublicKeyById(2)).to.exist();
expect(identity.getPublicKeyById(2).getDisabledAt()).to.be.at.least(now);

Expand Down

0 comments on commit 512eebf

Please sign in to comment.