Skip to content

Commit

Permalink
fix(a3p): remove unnecessary message and add underscores to digits
Browse files Browse the repository at this point in the history
- Address review comments from Agoric#10123
- Comment:
  - Agoric#10123 (comment)
  - Agoric#10123 (comment)
  • Loading branch information
Jorge-Lopes committed Sep 27, 2024
1 parent e0fa6c3 commit 4216ee1
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions a3p-integration/proposals/z:acceptance/vaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ test.serial('attempt to open vaults under the minimum amount', async t => {

const mint = '3.0';
const collateral = '5.0';
await t.throwsAsync(
() => openVault(USER1ADDR, mint, collateral),
{
message:
/Vault creation requires a minInitialDebt of {"brand":"\[Alleged: IST brand\]","value":"\[5000000n\]"}/,
},
'Error triggered by openVault does not contain the expected message',
);
await t.throwsAsync(() => openVault(USER1ADDR, mint, collateral), {
message:
/Vault creation requires a minInitialDebt of {"brand":"\[Alleged: IST brand\]","value":"\[5000000n\]"}/,
});

const activeVaultsAfter = await agopsVaults(USER1ADDR);
t.log('active vaults after:', activeVaultsAfter);
Expand Down Expand Up @@ -88,7 +84,7 @@ test.serial('remove collateral', async t => {

t.is(
collateralBefore,
collateralAfter + 1000000n,
collateralAfter + 1_000_000n,
'The vault Collateral should decrease after removing some ATOM',
);
});
Expand All @@ -111,7 +107,7 @@ test.serial('remove IST', async t => {

t.is(
debtAfter,
debtBefore + 1005000n,
debtBefore + 1_005_000n,
'The vault Debt should increase after removing some IST',
);
});
Expand Down Expand Up @@ -187,7 +183,7 @@ test.serial('add collateral', async t => {

t.is(
collateralBefore,
collateralAfter - 1000000n,
collateralAfter - 1_000_000n,
'The vault Collateral should increase after adding some ATOM',
);
});
Expand All @@ -211,7 +207,7 @@ test.serial('add IST', async t => {

t.is(
debtAfter,
debtBefore - 1000000n,
debtBefore - 1_000_000n,
'The vault Debt should decrease after adding some IST',
);
});
Expand Down

0 comments on commit 4216ee1

Please sign in to comment.