Skip to content

Commit

Permalink
test: don't rely on .serial to be sequential in liquidation-1
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 3, 2024
1 parent 35c42d7 commit fc11f3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions packages/boot/test/bootstrapTests/test-liquidation-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ const checkFlow1 = async (
t.fail(error.message);
});

await ensureVaultCollateral(collateralBrandKey, t);

const {
advanceTimeBy,
advanceTimeTo,
Expand Down Expand Up @@ -274,14 +276,12 @@ const checkFlow1 = async (

// TODO express spec up top in a way it can be passed in here
check.vaultNotification(managerIndex, 0, {
debt: undefined,
vaultState: 'liquidated',
locked: {
value: scale6(outcome.vaultsActual[0].locked),
},
});
check.vaultNotification(managerIndex, 1, {
debt: undefined,
vaultState: 'liquidated',
locked: {
value: scale6(outcome.vaultsActual[1].locked),
Expand All @@ -307,11 +307,6 @@ test.serial(
{},
);

test.serial('add STARS collateral', async t => {
await ensureVaultCollateral('STARS', t);
t.pass(); // reached here without throws
});

test.serial(
'liquidate STARS',
checkFlow1,
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/tools/liquidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const makeLiquidationTestKit = async ({
const notification = readLatest(
`published.vaultFactory.managers.manager${managerIndex}.vaults.vault${vaultIndex}`,
);
t.like(notification, partial);
t.like(notification, partial, 'vault notification did not match');
},
};

Expand Down

0 comments on commit fc11f3d

Please sign in to comment.