Skip to content

Commit

Permalink
fix: using expect correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Jul 7, 2023
1 parent 03a129c commit d6f6f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const config: HardhatUserConfig = {
chainId: 1,
gasPrice: 0,
initialBaseFeePerGas: 0,
accounts: {
count: 102,
},
},
},
solidity: {
Expand Down
8 changes: 4 additions & 4 deletions test/hardhat/Blue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Blue, OracleMock, ERC20Mock } from "types";

const iterations = 500;
const closePositions = false;
const nbLiquidations = 5;
expect(2 * nbLiquidations + 1 < 20, "more liquidations than signers");
const nbLiquidations = 50;
// The liquidations gas test expects that 2*nbLiquidations + 1 is strictly less than the number of signers.
const initBalance = constants.MaxUint256.div(2);

let seed = 42;
Expand Down Expand Up @@ -184,8 +184,8 @@ describe("Blue", () => {
expect(
!closePositions || collat == BigNumber.from(0),
"did not take the whole collateral when closing the position"
);
expect(closePositions || collat != BigNumber.from(0), "unexpectedly closed the position");
).true;
expect(closePositions || collat != BigNumber.from(0), "unexpectedly closed the position").true;
}
});
});

0 comments on commit d6f6f2a

Please sign in to comment.