Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Fix test logic in pool-init.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzal3x committed Jan 16, 2024
1 parent 66b490b commit ed5eb33
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/unit/pool-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,12 @@ describe('✂️ Pool splitting', () => {
keypair: adminKeypair,
client: client,
});
const initialPoolBalanceBeforeSplit = totalBalance(initial_pool);

const num_objects_before_split = initial_pool.objects.size;
const new_pool: Pool = await initial_pool.split(client);
const initialPoolBalanceAfterSplit = totalBalance(initial_pool);

const num_objects_new_pool = new_pool.objects.size;
const num_objects_after_split = initial_pool.objects.size;
expect(num_objects_new_pool).toBeGreaterThanOrEqual(1);
expect(num_objects_new_pool + num_objects_after_split).toEqual(
num_objects_before_split,
);

const newPoolBalance = totalBalance(new_pool);
expect(initialPoolBalanceBeforeSplit - newPoolBalance).toEqual(
initialPoolBalanceAfterSplit,
);
expect(newPoolBalance).toBeGreaterThanOrEqual(
DefaultSplitStrategy.defaultMinimumBalance,
);
Expand Down

0 comments on commit ed5eb33

Please sign in to comment.