From fc11f3d612e27cd28e7258822b0995c756513649 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Wed, 3 Apr 2024 11:07:03 -0700 Subject: [PATCH] test: don't rely on .serial to be sequential in liquidation-1 --- packages/boot/test/bootstrapTests/test-liquidation-1.ts | 9 ++------- packages/boot/tools/liquidation.ts | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/boot/test/bootstrapTests/test-liquidation-1.ts b/packages/boot/test/bootstrapTests/test-liquidation-1.ts index b9922456dc0a..6510409902d7 100644 --- a/packages/boot/test/bootstrapTests/test-liquidation-1.ts +++ b/packages/boot/test/bootstrapTests/test-liquidation-1.ts @@ -140,6 +140,8 @@ const checkFlow1 = async ( t.fail(error.message); }); + await ensureVaultCollateral(collateralBrandKey, t); + const { advanceTimeBy, advanceTimeTo, @@ -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), @@ -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, diff --git a/packages/boot/tools/liquidation.ts b/packages/boot/tools/liquidation.ts index 2e88d7d56e96..c839c5c38693 100644 --- a/packages/boot/tools/liquidation.ts +++ b/packages/boot/tools/liquidation.ts @@ -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'); }, };